aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2008-03-20 23:14:35 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2008-03-20 23:14:35 +0000
commitad6003f260068a46bd378c5601604bc1cf077e74 (patch)
tree1118cd00df41aae6eb9b333544d174fc12d3fc3f
parent2acdc1fb2d1f9b72672256ba3aa5fd74d1436223 (diff)
downloadgcc-ad6003f260068a46bd378c5601604bc1cf077e74.zip
gcc-ad6003f260068a46bd378c5601604bc1cf077e74.tar.gz
gcc-ad6003f260068a46bd378c5601604bc1cf077e74.tar.bz2
tree-scalar-evolution.c (chrec_contains_symbols_defined_in_loop): Use is_gimple_min_invariant instead of TREE_INVARIANT.
2008-03-21 Richard Guenther <rguenther@suse.de> * tree-scalar-evolution.c (chrec_contains_symbols_defined_in_loop): Use is_gimple_min_invariant instead of TREE_INVARIANT. * tree-ssa-loop-ivopts.c (force_expr_to_var_cost): Likewise. * tree-ssa-dom.c (record_equality): Likewise. * tree-inline.c (copy_body_r): Likewise. * tree-ssa-pre.c (make_values_for_stmt): Remove test for TREE_INVARIANT. From-SVN: r133403
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/tree-inline.c4
-rw-r--r--gcc/tree-scalar-evolution.c2
-rw-r--r--gcc/tree-ssa-dom.c7
-rw-r--r--gcc/tree-ssa-loop-ivopts.c2
-rw-r--r--gcc/tree-ssa-pre.c1
6 files changed, 18 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 02ff5fa..25d73b8 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,13 @@
+2008-03-21 Richard Guenther <rguenther@suse.de>
+
+ * tree-scalar-evolution.c (chrec_contains_symbols_defined_in_loop):
+ Use is_gimple_min_invariant instead of TREE_INVARIANT.
+ * tree-ssa-loop-ivopts.c (force_expr_to_var_cost): Likewise.
+ * tree-ssa-dom.c (record_equality): Likewise.
+ * tree-inline.c (copy_body_r): Likewise.
+ * tree-ssa-pre.c (make_values_for_stmt): Remove test for
+ TREE_INVARIANT.
+
2008-03-20 Kaz Kojima <kkojima@gcc.gnu.org>
* config/sh/sh.c (split_branches): Pass zero to redirect_jump
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index 54cacb5..216e3b4 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -773,7 +773,7 @@ copy_body_r (tree *tp, int *walk_subtrees, void *data)
and friends are up-to-date. */
else if (TREE_CODE (*tp) == ADDR_EXPR)
{
- int invariant = TREE_INVARIANT (*tp);
+ int invariant = is_gimple_min_invariant (*tp);
walk_tree (&TREE_OPERAND (*tp, 0), copy_body_r, id, NULL);
/* Handle the case where we substituted an INDIRECT_REF
into the operand of the ADDR_EXPR. */
@@ -783,7 +783,7 @@ copy_body_r (tree *tp, int *walk_subtrees, void *data)
recompute_tree_invariant_for_addr_expr (*tp);
/* If this used to be invariant, but is not any longer,
then regimplification is probably needed. */
- if (invariant && !TREE_INVARIANT (*tp))
+ if (invariant && !is_gimple_min_invariant (*tp))
id->regimplify = true;
*walk_subtrees = 0;
}
diff --git a/gcc/tree-scalar-evolution.c b/gcc/tree-scalar-evolution.c
index 4d771b7..29f0dcf 100644
--- a/gcc/tree-scalar-evolution.c
+++ b/gcc/tree-scalar-evolution.c
@@ -360,7 +360,7 @@ chrec_contains_symbols_defined_in_loop (const_tree chrec, unsigned loop_nb)
if (chrec == NULL_TREE)
return false;
- if (TREE_INVARIANT (chrec))
+ if (is_gimple_min_invariant (chrec))
return false;
if (TREE_CODE (chrec) == VAR_DECL
diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c
index 4d95261..64ff4ef 100644
--- a/gcc/tree-ssa-dom.c
+++ b/gcc/tree-ssa-dom.c
@@ -1146,11 +1146,12 @@ record_equality (tree x, tree y)
(by depth), then use that.
Otherwise it doesn't matter which value we choose, just so
long as we canonicalize on one value. */
- if (TREE_INVARIANT (y))
+ if (is_gimple_min_invariant (y))
;
- else if (TREE_INVARIANT (x) || (loop_depth_of_name (x) <= loop_depth_of_name (y)))
+ else if (is_gimple_min_invariant (x)
+ || (loop_depth_of_name (x) <= loop_depth_of_name (y)))
prev_x = x, x = y, y = prev_x, prev_x = prev_y;
- else if (prev_x && TREE_INVARIANT (prev_x))
+ else if (prev_x && is_gimple_min_invariant (prev_x))
x = y, y = prev_x, prev_x = prev_y;
else if (prev_y && TREE_CODE (prev_y) != VALUE_HANDLE)
y = prev_y;
diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c
index 9b406ce..93f3be6 100644
--- a/gcc/tree-ssa-loop-ivopts.c
+++ b/gcc/tree-ssa-loop-ivopts.c
@@ -3222,7 +3222,7 @@ force_expr_to_var_cost (tree expr)
if (SSA_VAR_P (expr))
return zero_cost;
- if (TREE_INVARIANT (expr))
+ if (is_gimple_min_invariant (expr))
{
if (TREE_CODE (expr) == INTEGER_CST)
return new_cost (integer_cost, 0);
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c
index e6a931d..13c4e97 100644
--- a/gcc/tree-ssa-pre.c
+++ b/gcc/tree-ssa-pre.c
@@ -3369,7 +3369,6 @@ make_values_for_stmt (tree stmt, basic_block block)
&& !SSA_NAME_OCCURS_IN_ABNORMAL_PHI (rhs))
|| is_gimple_min_invariant (rhs)
|| TREE_CODE (rhs) == ADDR_EXPR
- || TREE_INVARIANT (rhs)
|| DECL_P (rhs))
{