This is the mail archive of the gcc@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: GCC 4.5.0 Status Report (2009-05-05)


On Wed, 2009-05-06 at 17:55 +0200, Michael Matz wrote:
> Hi,
> 
> On Wed, 6 May 2009, Richard Earnshaw wrote:
> 
> > > The easiest solution would be to just make a note that you need the 
> > > PIC register and then, when expanding the prologue emit the necessary 
> > > instructions.  IMO that makes sense as PIC register setup usually is 
> > > something the prologue does, like all the other register setups 
> > > necessary.
> > 
> > That won't work because the PIC register on ARM is a pseudo, so 
> > generating it during prologue generation is too late.  It needs to exist 
> > before data flow analysis starts on the RTL.
> 
> That's fine.  You can generate the pseudo, just not emit the code to load 
> it until prologue generation starts.  Dataflow analysis starts only after 
> everything is expanded to RTL anyway.  I'll try to cobble up a patch to 
> show what I mean, but obviously I'm not very fluent with the ARM backend.

Sorry, I'm confused.  Prologue generation happens after register
allocation (it can't be otherwise since we don't know which registers
have to be saved).  The PIC register has to appear as being live at the
start of the function so that the uses of it don't appear to be magic.

R.


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