summaryrefslogtreecommitdiffstats
path: root/gcc/tree-ssa-loop-im.c
diff options
context:
space:
mode:
authorrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2004-11-14 18:04:25 +0000
committerrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2004-11-14 18:04:25 +0000
commita64230af82322369a965777aa52d931a3ad7e93f (patch)
tree4342616d30f20c349279f331a6f1ad5af6c0e53b /gcc/tree-ssa-loop-im.c
parent877071a72f300a2e72bf8600db6acea1a873ca59 (diff)
downloadppe42-gcc-a64230af82322369a965777aa52d931a3ad7e93f.tar.gz
ppe42-gcc-a64230af82322369a965777aa52d931a3ad7e93f.zip
PR tree-optimization/18431
* tree-flow.h (stmt_references_memory_p): Declare. * tree-ssa-loop-im.c (stmt_cost): Use stmt_references_memory_p. * tree-ssa.c (stmt_references_memory_p): New function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@90624 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-loop-im.c')
-rw-r--r--gcc/tree-ssa-loop-im.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/gcc/tree-ssa-loop-im.c b/gcc/tree-ssa-loop-im.c
index d04d095828e..3c755537b50 100644
--- a/gcc/tree-ssa-loop-im.c
+++ b/gcc/tree-ssa-loop-im.c
@@ -365,9 +365,7 @@ stmt_cost (tree stmt)
rhs = TREE_OPERAND (stmt, 1);
/* Hoisting memory references out should almost surely be a win. */
- if (!is_gimple_variable (lhs))
- cost += 20;
- if (is_gimple_addressable (rhs) && !is_gimple_variable (rhs))
+ if (stmt_references_memory_p (stmt))
cost += 20;
switch (TREE_CODE (rhs))
OpenPOWER on IntegriCloud