[PATCH, PR 10474] Shedule pass_cprop_hardreg before pass_thread_prologue_and_epilogue

Jeff Law law@redhat.com
Fri Apr 19 20:59:00 GMT 2013


On 04/18/2013 04:09 PM, Martin Jambor wrote:
>
> I did not because I did not think it would be substantially faster
> than running the pass as-is twice.
I wasn't looking to improve compile-time performance, but from a 
standpoint of not losing optimizations.  If we can show that a second 
pass does virtually nothing then this becomes a moot question.

>
> What would very likely be a working alternative for shrink-wrapping is
> to have shrink-wrapping preparation invoke copyprop_hardreg_forward_1
> on the first BB and the few BBs it tries to move stuff across.  But of
> course that would be a bit ugly and so I think we should do it only if
> there is a reason not to move the pass (or schedule it twice).
Or a pass to sink just the moves out of the incoming argument registers. 
  From a dataflow standpoint that should be a relatively cheap problem 
to solve.

For each argument register you need to know the block where it's 
generated (usually the first block), blocks which clobber and blocks 
which use.

You then run a latest insertion point algorithm, or a variant thereof to 
determine the latest safe insertion points.

Jeff



More information about the Gcc-patches mailing list