Lines Matching defs:predicate
1 /* Support for simple predicate analysis.
44 #include "gimple-predicate-analysis.h"
64 that's controlled by the same predicate). */
205 /* Dump the predicate chain PREDS for STMT, prefixed by MSG. */
281 /* Return true if PRED is common among all predicate chains in PREDS
318 /* Find a predicate to examine against paths of interest. If there
319 is no predicate of the "FLAG_VAR CMP CONST" form, try to find one
359 /* Check if we can take advantage of FLAG_VAR COMP FLAG_VAR predicate
423 /* Return if any "flag_var comp const" predicate is found. */
429 /* Record if any "flag_var comp flag_var[vinfo]" predicate is found. */
437 /* Return the "flag_var cmp flag_var[vinfo]" predicate we found. */
450 is the const value used in the predicate associated with the flag,
451 CMP_CODE is the comparison code used in the predicate, VISITED_PHIS
482 predicate::func_t &eval,
486 /* The Boolean predicate guarding the PHI definition. Initialized
489 predicate def_preds (eval);
576 predicate::func_t &eval, hash_set<gimple *> *visited)
637 /* Return an expression corresponding to the predicate PRED. */
685 predicate::func_t::phi_arg_set (gphi *phi)
696 /* Determine if the predicate set of the use does not overlap with that
745 Predicate analysis needs to compute the composite predicate:
747 1) 'x' use predicate: (n > 0) .AND. (m < 2)
748 2) 'x' default value (non-def) predicate: .NOT. (n > 0)
749 (the predicate chain for phi operand defs can be computed
759 the predicate analysis if jump threading eliminates the merge point
768 predicate::overlap (gphi *phi, unsigned opnds, hash_set<gphi *> *visited)
774 /* Find within the common prefix of multiple predicate chains
775 a predicate that is a comparison of a flag variable against
783 value that is in conflict with the use guard/predicate. */
847 /* Return true if VAL satisfies (x CMPC BOUNDARY) predicate. CMPC can
867 /* Return true if the domain of single predicate expression PRED1
933 /* Return true if the domain defined by the predicate chain PREDS is
941 predicate::includes (const pred_chain &chain) const
954 individual predicate chains (this won't be a computationally costly
960 predicate::superset_of (const predicate &preds) const
969 /* Create a predicate of the form OP != 0 and push it the work list CHAIN. */
1154 /* Return true if PRED can be invalidated by any predicate in GUARD. */
1161 fprintf (dump_file, "Testing if predicate: ");
1175 fprintf (dump_file, " Predicate invalidated by: ");
1207 /* If we were unable to invalidate any predicate in C, then there
1220 predicate::use_cannot_happen (gphi *phi, unsigned opnds)
1257 fprintf (dump_file, "predicate::use_cannot_happen (...) "
1264 predicate def_preds (m_eval);
1267 /* If there's no predicate there's no basis to rule the use out. */
1292 PREDS is the predicate chains, and N is the number of chains. */
1294 /* Implement rule 1 above. PREDS is the AND predicate to simplify
1355 /* Implements rule 2 for the OR predicate PREDS:
1360 predicate::simplify_2 ()
1429 /* Implement rule 3 for the OR predicate PREDS:
1434 predicate::simplify_3 ()
1476 /* Implement rule 4 for the OR predicate PREDS:
1482 predicate::simplify_4 ()
1552 predicate::simplify (gimple *use_or_def, bool is_use)
1583 /* Attempt to normalize predicate chains by following UD chains by
1615 predicate::push_pred (const pred_info &pred)
1625 predicate::dump (gimple *stmt, const char *msg) const
1668 predicate::predicate (basic_block def_bb, basic_block use_bb, func_t &eval)
1672 equivalent of (is guarded by the same predicate as) DEF_BB that also
1703 fprintf (dump_file, "predicate::predicate (def_bb = %u, use_bb = %u, func_t) "
1718 predicate::~predicate ()
1728 predicate&
1729 predicate::operator= (const predicate &rhs)
1754 Return true if a nonempty predicate has been obtained. */
1757 predicate::init_from_phi_def (gphi *phi)
1798 /* Convert control dependence chains to the predicate in *THIS under
1808 PHI's def in USE_STMT is guarded by a predicate set that does not
1809 overlap with the predicate sets of all runtime paths that do not
1818 THIS->M_PREDS contains the (memoized) defining predicate chains of
1819 a PHI. If THIS->M_PREDS is empty, the PHI's defining predicate
1825 predicate::is_use_guarded (gimple *use_stmt, basic_block use_bb,
1835 /* Try to build the predicate expression under which the PHI flows
1838 predicate use_preds (def_bb, use_bb, m_eval);
1861 fputs ("found predicate overlap\n", dump_file);
1887 /* Return true if the predicate guarding the valid definition (i.e.,
1888 *THIS) is a superset of the predicate guarding the use (i.e.,
1901 predicate::is_use_guarded (gimple *stmt, basic_block use_bb, gphi *phi,
1908 /* Normalize predicate PRED:
1914 predicate::normalize (pred_chain *norm_chain,
1939 /* Punt for a nonzero constant. The predicate should be one guarding
2010 predicate::normalize (const pred_info &pred)
2053 /* Normalize a single predicate PRED_CHAIN and append it to *THIS. */
2056 predicate::normalize (const pred_chain &chain)
2071 predicate pred (m_eval);
2072 /* The predicate object is not modified here, only NORM_CHAIN and
2081 /* Normalize predicate chains in THIS. */
2084 predicate::normalize (gimple *use_or_def, bool is_use)
2092 predicate norm_preds (m_eval);
2113 a dependence chain is mapped to predicate expression represented by
2115 predicate that is the result of AND operation of pred_info mapped to
2116 each edge. A composite predicate is represented by a vector of
2120 predicate::init_from_control_deps (const vec<edge> *dep_chains,
2190 Add the negated predicate(s) for the edge to record
2282 /* Return the predicate expression guarding the definition of
2284 NOT of the predicate. */
2287 predicate::def_expr (bool invert /* = false */) const
2289 /* The predicate is stored in an inverted form. */
2293 /* Return the predicate expression guarding the use of the interesting
2294 variable or null if the use predicate hasn't been determined yet. */
2297 predicate::use_expr () const
2302 /* Return a logical AND expression with the (optionally inverted) predicate
2304 guarding its use. Return null if the use predicate hasn't yet been
2308 predicate::expr (bool invert /* = false */) const