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

Re: Scheduling and inserting NOPs


Boris Boesler writes:
 > 
 > Am 21.11.2007 um 18:39 schrieb Andrew Haley:
 > 
 > >> Walk the instructions in each BB, and if you see a violation stuff  
 > >> a NOP.
 > >>
 > >> This is so simple that I'm wondering if there's something important
 > >> that I'm failing to understand.
 > >
 > > Ah, hold on.  Is it that you don't know where sched inserted the empty
 > > cycles, and there's no easy way to find out?
 > 
 >   Finally. YES.
 > 
 >   To solve this someone simply stored cycle and insn (recorded in  
 > TARGET_SCHED_REORDER) in a hash-table and reused this info in  
 > TARGET_MACHINE_DEPENDENT_REORG. But I read that there passes which  
 > might reorder or insert additional code. In that case the info in the  
 > hash-table might be incorrect or not valid.
 > 
 >   Any ideas?

I'd still do what I suggested: walk the instruction list inserting
NOPs, first based on the information from sched, and if that doesn't
work out because stuff has moved, just count instructions to make sure
you don't violate the constraints.

Andrew.

-- 
Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, UK
Registered in England and Wales No. 3798903


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