Here's a set of patches to reenable the struct_equiv crossjumping while
keeping compile times under control. Crossjumping is now done in a
batch over all basic blocks when no other cfg optimizations have been found.
I was slightly surprised that changing the order of things done in
try_optimize_cfg sometimes has an effect on generated code. It seems we
don't always cross jump if we can, and we don't always merge blocks
either when doing so would be beneficial. That probably ought to be
investigated.
Despite these problems, the set of four patches when applied together is
a convincing win in the code size department, as evidenced by these
numbers for a bootstrapped cc1:
Before:
12 .text 0051b65c 08049c20 08049c20 00001c20 2**4
After:
12 .text 0051767c 08049c20 08049c20 00001c20 2**4
Compile time still increases, but nowhere near as much as it used to
when the struct-equiv patch was backed out. These are the times from an
unpatched cc1 compiling a large number of files from .i to .s:
real 10m26.179s
user 10m16.683s
sys 0m7.644s
and these are from a patched compiler:
real 10m28.403s
user 10m20.159s
sys 0m7.740s
which I think is acceptable given the code size gains - a full compile
from .c to .o is going to show even less of an effect. Does anyone
disagree strongly with this?