From: Zhenqiang Chen Date: Thu, 19 Jun 2014 09:04:58 +0000 (+0000) Subject: loop-invariant.c (get_inv_cost): Skip invariants, which are marked as "move", from... X-Git-Tag: releases/gcc-5.1.0~6772 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=61fc05c74a1c4f5baf2c4cecb147e2fa39603d6a;p=thirdparty%2Fgcc.git loop-invariant.c (get_inv_cost): Skip invariants, which are marked as "move", from depends_on. 2014-06-19 Zhenqiang Chen * loop-invariant.c (get_inv_cost): Skip invariants, which are marked as "move", from depends_on. From-SVN: r211818 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2d22cde514db..d5ac634dda79 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2014-06-19 Zhenqiang Chen + + * loop-invariant.c (get_inv_cost): Skip invariants, which are marked + as "move", from depends_on. + 2014-06-19 Terry Guo * config/arm/thumb1.md (define_split): Split 64bit constant in earlier diff --git a/gcc/loop-invariant.c b/gcc/loop-invariant.c index 898a431af2c0..f683d8ccfe9e 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)