https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81766

Segher Boessenkool <segher at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |segher at gcc dot gnu.org

--- Comment #11 from Segher Boessenkool <segher at gcc dot gnu.org> ---
(In reply to UroŇ° Bizjak from comment #6)
> (In reply to Jakub Jelinek from comment #4)
> 
> > This stuff is weird anyway, do we really need it at the beginning of the
> > function, even if we say shrink-wrap (i.e. shouldn't it be done in the
> > prologue)?
> 
> PIC setup should be emitted in the prologue. Perhaps this is the task for
> separate components shrink-wrapping, since PIC register can nowadays be any
> register.

It can be a separate component, which is a very good idea if initialising
the PIC reg is expensive, or if you often need it done before you need the
rest of the prologue.  It can also be part of the normal prologue, which
will work just fine (shrink-wrapping knows about the PIC reg, it puts the
prologue before any use of the PIC reg).  But the i386 port uses
TARGET_INIT_PIC_REG instead.  Why can't this be done in the prologue, are
there any downsides to that?

Reply via email to