This is the mail archive of the 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]

[vtab (and trunk?)] find call before notes at the end of a BB

If a call is followed by notes at the end of a BB,
rtl_block_ends_with_call_p () returns false.  I think it should return
true, but I only need this for vtab ATM, so as to avoid scheduling
differences with or without -g -fvar-tracking-assignments.

Bootstrapped on x86_64-linux-gnu.  Ok to install?

for  gcc/ChangeLog
from  Alexandre Oliva  <>

	* cfgrtl.c (rtl_block_ends_with_call_p): Skip notes at the end.

Index: gcc/cfgrtl.c
--- gcc/cfgrtl.c.orig	2007-09-17 15:31:48.000000000 -0300
+++ gcc/cfgrtl.c	2007-09-17 15:34:01.000000000 -0300
@@ -2702,7 +2702,8 @@ rtl_block_ends_with_call_p (basic_block 
   while (!CALL_P (insn)
 	 && insn != BB_HEAD (bb)
-	 && keep_with_call_p (insn))
+	 && (keep_with_call_p (insn)
+	     || NOTE_P (insn)))
     insn = PREV_INSN (insn);
   return (CALL_P (insn));
Alexandre Oliva
FSF Latin America Board Member
Red Hat Compiler Engineer   aoliva@{,}
Free Software Evangelist  oliva@{,}

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