This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, PR 10474] Shedule pass_cprop_hardreg before pass_thread_prologue_and_epilogue
- From: Jeff Law <law at redhat dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 19 Apr 2013 09:35:17 -0600
- Subject: Re: [PATCH, PR 10474] Shedule pass_cprop_hardreg before pass_thread_prologue_and_epilogue
- References: <20130417154935 dot GC3656 at virgil dot suse> <516EED6F dot 9030007 at redhat dot com> <20130418220949 dot GA3859 at alvy dot suse dot cz>
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