aboutsummaryrefslogtreecommitdiff
path: root/gcc/loop-invariant.c
diff options
context:
space:
mode:
authorZhenqiang Chen <zhenqiang.chen@linaro.org>2014-06-19 09:04:58 +0000
committerZhenqiang Chen <zqchen@gcc.gnu.org>2014-06-19 09:04:58 +0000
commit61fc05c74a1c4f5baf2c4cecb147e2fa39603d6a (patch)
treede84af461bdf6d01a6a92bf7b325adfe54cc9054 /gcc/loop-invariant.c
parentdbb73879ff2eaa8ce0b33d946f7fe1aff15aa7d2 (diff)
downloadgcc-61fc05c74a1c4f5baf2c4cecb147e2fa39603d6a.zip
gcc-61fc05c74a1c4f5baf2c4cecb147e2fa39603d6a.tar.gz
gcc-61fc05c74a1c4f5baf2c4cecb147e2fa39603d6a.tar.bz2
loop-invariant.c (get_inv_cost): Skip invariants, which are marked as "move", from depends_on.
2014-06-19 Zhenqiang Chen <zhenqiang.chen@linaro.org> * loop-invariant.c (get_inv_cost): Skip invariants, which are marked as "move", from depends_on. From-SVN: r211818
Diffstat (limited to 'gcc/loop-invariant.c')
-rw-r--r--gcc/loop-invariant.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/loop-invariant.c b/gcc/loop-invariant.c
index 898a431..f683d8c 100644
--- a/gcc/loop-invariant.c
+++ b/gcc/loop-invariant.c
@@ -1136,6 +1136,10 @@ get_inv_cost (struct invariant *inv, int *comp_cost, unsigned *regs_needed)
dep = invariants[depno];
+ /* If DEP is moved out of the loop, it is not a depends_on any more. */
+ if (dep->move)
+ continue;
+
get_inv_cost (dep, &acomp_cost, aregs_needed);
if (! flag_ira_loop_pressure)