This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[vta] don't let debug insns affect rtl loop invariant decisions


Uses in a debug insn were taken into account in loop invariant
decisions, leading to different outcomes depending on whether VTA was
enabled or not.  Oops.

Fixed as follows.  Installing in the branch.

for  gcc/ChangeLog.vta
from  Alexandre Oliva  <aoliva@redhat.com>

	* loop-invariant.c (find_invariants_bb): Ignore debug insns.

Index: gcc/loop-invariant.c
===================================================================
--- gcc/loop-invariant.c.orig	2008-10-10 09:31:06.000000000 -0300
+++ gcc/loop-invariant.c	2008-11-13 20:32:42.000000000 -0200
@@ -897,7 +897,7 @@ find_invariants_bb (basic_block bb, bool
 
   FOR_BB_INSNS (bb, insn)
     {
-      if (!INSN_P (insn))
+      if (!INSN_P (insn) || DEBUG_INSN_P (insn))
 	continue;
 
       find_invariants_insn (insn, always_reached, always_executed);
-- 
Alexandre Oliva         http://www.lsd.ic.unicamp.br/~oliva/
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}
FSFLA Board Member       ÂSÃ Libre! => http://www.fsfla.org/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]