Message ID | CACgzC7B8Y8X-_pcKV+EavpFGFkq9XH-D0VF6vcTJuM5TGgRq2Q@mail.gmail.com |
---|---|
State | New |
Headers | show |
On Tue, Jun 10, 2014 at 11:32 AM, Zhenqiang Chen wrote: > > * loop-invariant.c (get_inv_cost): Skip invariants, which are marked > as "move", from depends_on. > This is OK. Ciao! Steven
diff --git a/gcc/loop-invariant.c b/gcc/loop-invariant.c index e822bb6..fca9c2f 100644 --- a/gcc/loop-invariant.c +++ b/gcc/loop-invariant.c @@ -1148,6 +1148,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; + dep_ret = get_inv_cost (dep, &acomp_cost, aregs_needed, &dep_cl);