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]

Re: Initial shrink-wrapping patch

On 10/06/2011 09:01 AM, Bernd Schmidt wrote:
> On 10/06/11 17:57, Ian Lance Taylor wrote:
>> There is absolutely no reason to try to shrink wrap that code.  It will
>> never help.  That code always has to be first.  It especially has to be
>> first because the gold linker recognizes the prologue specially when a
>> split-stack function calls a non-split-stack function, in order to
>> request a larger stack.
> Urgh, ok.
>> Therefore, it seems to me that we should apply shrink wrapping to the
>> function as it exists *before* the split-stack prologue is created.  The
>> flag_split_stack bit should be moved after the flag_shrink_wrap bit.
> Sounds like we just need to always emit the split prologue on the
> original entry edge then. Can you test the following with Go?

Looks reasonable.

I wonder if we can have this as a generic feature?  I'm thinking about
things like the MIPS and Alpha load-gp stuff.  That operation also needs
to happen exactly at the start of the function, due to the pc-relative
nature of the operation.

I do see that MIPS works around this by emitting the load-gp as text
in the legacy prologue.  But Alpha makes some effort to emit this as
rtl, so that the scheduler knows about the two pipeline reservations
and the latency of any use of the gp register.

Would a "pre_prologue" named pattern seem wrong to anyone?


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