aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-predicate-analysis.cc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2022-08-22 14:45:38 +0200
committerRichard Biener <rguenther@suse.de>2022-08-22 16:13:11 +0200
commitb6316324fceaef431799a8b386de5cc9881d6898 (patch)
tree14341b8990015a6158075d07176a00e7f33fefd1 /gcc/gimple-predicate-analysis.cc
parent827f64135957ce21617cd0345508077439fa29d8 (diff)
downloadgcc-b6316324fceaef431799a8b386de5cc9881d6898.zip
gcc-b6316324fceaef431799a8b386de5cc9881d6898.tar.gz
gcc-b6316324fceaef431799a8b386de5cc9881d6898.tar.bz2
Remove dead predicate analysis GENERIC expr building code
The following removes the unused def_expr, use_expr and expr APIs from the predicate class including the unconditional build of the GENERIC use_expr on each uninit analysis run. * gimple-predicate-analysis.h (predicate::m_use_expr): Remove. (predicate::def_expr): Likewise. (predicate::use_expr): Likewise. (predicate::expr): Likewise. * gimple-predicate-analysis.cc (predicate::def_expr): Remove. (predicate::use_expr): Likewise. (predicate::expr): Likewise. (predicate::is_use_guarded): Do not build m_use_expr.
Diffstat (limited to 'gcc/gimple-predicate-analysis.cc')
-rw-r--r--gcc/gimple-predicate-analysis.cc39
1 files changed, 0 insertions, 39 deletions
diff --git a/gcc/gimple-predicate-analysis.cc b/gcc/gimple-predicate-analysis.cc
index 820a9bd..d1b0d12 100644
--- a/gcc/gimple-predicate-analysis.cc
+++ b/gcc/gimple-predicate-analysis.cc
@@ -1892,7 +1892,6 @@ predicate::is_use_guarded (gimple *use_stmt, basic_block use_bb,
/* 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. */
@@ -1921,7 +1920,6 @@ predicate::is_use_guarded (gimple *use_stmt, basic_block use_bb,
/* Lazily initialize *THIS from PHI. */
if (!init_from_phi_def (phi))
{
- m_use_expr = build_pred_expr (use_preds.m_preds);
return false;
}
@@ -1938,8 +1936,6 @@ predicate::is_use_guarded (gimple *use_stmt, basic_block use_bb,
if (superset_of (use_preds))
return true;
- m_use_expr = build_pred_expr (use_preds.m_preds);
-
return false;
}
@@ -2326,38 +2322,3 @@ predicate::init_from_control_deps (const vec<edge> *dep_chains,
/* 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);
-}