[PATCH] Fix RTL fwprop compile-time for PR56113

Steven Bosscher stevenb.gcc@gmail.com
Tue Jan 29 23:01:00 GMT 2013


This brings down compile time for fwprop by avoiding CFG changes in
loop_optimizer_init(). The CFG changes it could make would invalidate
the fast dominance queries, so that walk_dominator_tree had to work
with the slow queries -- rather painful on a CFG with an almost flat
dominator tree.

With the n=10000 test case, we go from unpatched:

 forward prop            :  39.13 (13%) usr

to patched:

 forward prop            :  13.60 ( 5%) usr

That's still not a reasonable amount of time for such a simple pass,
but it's better than before...

To prevent that mistake in the future, I've add an assert in dominance.c.

OK for trunk?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PR56113_3.diff
Type: application/octet-stream
Size: 1608 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20130129/3a78d68c/attachment.obj>

More information about the Gcc-patches mailing list