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