/* Lazily initialize *THIS from the PHI and build its use
expression. */
init_from_phi_def (phi);
- m_use_expr = build_pred_expr (use_preds.m_preds);
}
/* The use is not guarded. */
/* Lazily initialize *THIS from PHI. */
if (!init_from_phi_def (phi))
{
- m_use_expr = build_pred_expr (use_preds.m_preds);
return false;
}
if (superset_of (use_preds))
return true;
- m_use_expr = build_pred_expr (use_preds.m_preds);
-
return false;
}
/* Clear M_PREDS to indicate failure. */
m_preds.release ();
}
-
-/* Return the predicate expression guarding the definition of
- the interesting variable. When INVERT is set, return the logical
- NOT of the predicate. */
-
-tree
-predicate::def_expr (bool invert /* = false */) const
-{
- /* The predicate is stored in an inverted form. */
- return build_pred_expr (m_preds, !invert);
-}
-
-/* Return the predicate expression guarding the use of the interesting
- variable or null if the use predicate hasn't been determined yet. */
-
-tree
-predicate::use_expr () const
-{
- return m_use_expr;
-}
-
-/* Return a logical AND expression with the (optionally inverted) predicate
- expression guarding the definition of the interesting variable and one
- guarding its use. Return null if the use predicate hasn't yet been
- determined. */
-
-tree
-predicate::expr (bool invert /* = false */) const
-{
- if (!m_use_expr)
- return NULL_TREE;
-
- tree expr = build_pred_expr (m_preds, !invert);
- return build2 (TRUTH_AND_EXPR, boolean_type_node, expr, m_use_expr);
-}
/* Construct with the specified EVAL object. */
predicate (func_t &eval)
- : m_preds (vNULL), m_eval (eval), m_use_expr () { }
+ : m_preds (vNULL), m_eval (eval) { }
/* Copy. */
predicate (const predicate &rhs)
- : m_preds (vNULL), m_eval (rhs.m_eval), m_use_expr ()
+ : m_preds (vNULL), m_eval (rhs.m_eval)
{
*this = rhs;
}
bool is_use_guarded (gimple *, basic_block, gphi *, unsigned,
hash_set<gphi *> *);
- /* Return the predicate expression guarding the definition of
- the interesting variable, optionally inverted. */
- tree def_expr (bool = false) const;
- /* Return the predicate expression guarding the use of the interesting
- variable. */
- tree use_expr () const;
-
- tree expr (bool = false) const;
-
private:
bool includes (const pred_chain &) const;
bool superset_of (const predicate &) const;
pred_chain_union m_preds;
/* Callback to evaluate an operand. Return true if it's interesting. */
func_t &m_eval;
- /* The predicate expression guarding the use of the interesting
- variable. */
- tree m_use_expr;
};
/* Bit mask handling macros. */