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 sched regard a debug insn as the first one in a cycle


Sched assumes asm insns are issued in separate cycles as other kinds
of insns.  There's no need for debug insns to push an asm insn into
another cycle, though.  This actually causes codegen changes, if an
asm insn would have been issued at a cycle but, because of the debug
insn, it's delayed, and another insn is issued first.

This patch arranges for debug insns to not reset the flag that
indicates we're at the first insn in a cycle.  This only makes a
difference when the asm insn would be issued first in a block, because
in all other cases, the debug insn would be emitted as part of the
previous cycle anyway.

I'm checking this in in the vta branch soon.

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

	* haifa-sched.c (schedule_block): Don't clear
	first-insn-in-cycle status after scheduling debug insn.

Index: gcc/haifa-sched.c
===================================================================
--- gcc/haifa-sched.c.orig	2007-10-01 22:49:01.000000000 -0300
+++ gcc/haifa-sched.c	2007-10-30 19:52:55.000000000 -0200
@@ -2531,7 +2531,8 @@ schedule_block (basic_block *target_bb, 
 	  if (advance != 0)
 	    break;
 
-	  first_cycle_insn_p = 0;
+	  if (!DEBUG_INSN_P (insn))
+	    first_cycle_insn_p = 0;
 
 	  /* Sort the ready list based on priority.  This must be
 	     redone here, as schedule_insn may have readied additional
-- 
Alexandre Oliva         http://www.lsd.ic.unicamp.br/~oliva/
FSF Latin America Board Member         http://www.fsfla.org/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}

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