This is the mail archive of the
mailing list for the GCC project.
Re: birthpoints in rtl.
- From: Andrew MacLeod <amacleod at redhat dot com>
- To: Kenneth Zadeck <zadeck at naturalbridge dot com>
- Cc: gcc <gcc at gcc dot gnu dot org>, "Bonzini, Paolo" <bonzini at gnu dot org>, "Park, Seongbae" <seongbae dot park at gmail dot com>, Ian Lance Taylor <iant at google dot com>, Richard Sandiford <rsandifo at nildram dot co dot uk>, Steven Bosscher <stevenb dot gcc at gmail dot com>
- Date: Thu, 28 Feb 2008 11:23:07 -0500
- Subject: Re: birthpoints in rtl.
- References: <47C5EF2A.email@example.com>
Kenneth Zadeck wrote:
I wonder if we could use these factored copies with a threshold value
instead, such that we only use them when they will replace X uses or
defs, something that is tunable and start with high values for X. This
means the copies won't get in the way normally, and will make a big
difference when large/pathological cases come along. Experiments could
then determine a good value for X.
Birthpoints are not nearly as useful as phi-functions because the
algorithms that use birthpoints do not generally leave the birthpoints
in the right places when they are finished. There is a lot of value
added by the operand of phi-functions. But they do solve the n**2
case for DU and UD chains (and because of the better SSA building
algorithms than were available when Reif and Lewis first proposed
their technique, will be much faster).
The copies will then only interfere with optimizations when the
situation is already horrible. In fact, it wouldn't surprise me if this
could actually *help* a number of passes, including RA, for larger
values of X :-)
Does RTL have an efficient copy prop? That could then naturally remove
these copies when desired, and then they could be added back in as
needed the next time DU/UD chains are built. If they weren't removed,
the next DU/UD build wouldn't trigger the threshold machinery since the
copy is already there, and we still end up with the same results.
There is the complication of how to add the noop move in the presence
of SUBREGs, and given the amount of pain that I suffered in adding the
If we used thresholding, you could try simply punting on these initially
and see what happens, and only deal with it when it becomes an issue.
Anyway, just a thought on how to make it less intrusive.