This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: How to reverse patch reversal in cfgcleanup.c (Was: RFA: re-instate struct_equiv code)
- From: Bernd Schmidt <bernds_cb1 at t-online dot de>
- To: Joern RENNECKE <joern dot rennecke at st dot com>
- Cc: Daniel Berlin <dberlin at dberlin dot org>, Steven Bosscher <stevenb dot gcc at gmail dot com>, gcc at gcc dot gnu dot org
- Date: Thu, 26 Jan 2006 11:20:15 +0100
- Subject: Re: How to reverse patch reversal in cfgcleanup.c (Was: RFA: re-instate struct_equiv code)
- References: <200512150048.50502.stevenb@suse.de> <1134615284.9942.101.camel@linux.site> <43A2BCEE.3090508@t-online.de> <43BD984A.7090504@st.com> <43BD9945.2080302@st.com> <43BD9B60.6000208@st.com> <43C7C3FB.50204@st.com> <43C7C789.70400@st.com>
Joern RENNECKE wrote:
For easier reviewing, I have attached the diff to the cfgcleanup version
previous to the patch backout.
Thanks. Let me see if I understood the problem - please correct me if I
describe anything incorrectly.
The previous cross jumping code didn't care about register liveness,
since it just checked for identical instruction streams. The new, more
clever code, requires that regsets are identical at the end of the
blocks we're trying to match. In addition, cross-jumping can modify
blocks, requiring us to update life information (by calling a global
update_life_info in struct_equiv_init), which is the really expensive
part that caused the slowdown (how often did we end up updating life info?).
The new patch prevents multiple updates by introducing
STRUCT_EQUIV_SUSPEND_UPDATE. However, I don't see how this is safe
given that cross jumping will modify basic blocks and change the set of
registers live at their ends.
Is there a way to keep life info accurate when doing the cross jump (so
we don't set any dirty flags)? Or, possibly, change the algorithm so
that it visits blocks in a different order - dirtying more blocks before
doing a global life update?
I'm not sure what the best way to keep the svn history sane is. When/if
the patch is approved, should I first do an
svn merge -r108792:108791, check that in, and then apply the patch with
the actual new stuff?
Maybe
svn diff -r108792:108791 |patch -p0
patch <fixes.diff
svn commit
Bernd