[Bug lto/45810] 40% slowdown when using LTO for a single-file program
hubicka at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Jan 23 22:39:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45810
Jan Hubicka <hubicka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2011-01-23 15:59:30
--- Comment #19 from Jan Hubicka <hubicka at gcc dot gnu.org> 2011-01-23 21:05:51 UTC ---
This adds enough passes so we generate sane code for hookes_law.
(and we do that before inlining)
Index: passes.c
===================================================================
--- passes.c (revision 169136)
+++ passes.c (working copy)
@@ -775,6 +775,14 @@
NEXT_PASS (pass_convert_switch);
NEXT_PASS (pass_cleanup_eh);
NEXT_PASS (pass_profile);
+ NEXT_PASS (pass_tree_loop_init);
+ NEXT_PASS (pass_complete_unroll);
+ NEXT_PASS (pass_tree_loop_done);
+ NEXT_PASS (pass_ccp);
+ NEXT_PASS (pass_fre);
+ NEXT_PASS (pass_dse);
+ NEXT_PASS (pass_fre);
+ NEXT_PASS (pass_cd_dce);
NEXT_PASS (pass_local_pure_const);
/* Split functions creates parts that are not run through
early optimizations again. It is thus good idea to do this
@@ -782,7 +790,7 @@
We need to unroll the loop, do ccp to get constant array indexes, FRE to
propagate through memory acceses. For some reason FRE is needed twice or the
loads from the temporary array are not copy propagated.
I didn't tested if DSE is really needed or cd_dce gets rid of the dead store
into the array. Still a lot of copyprop oppurtunity is left.
This makes hookes_law estimate to be 91 instructions, so -finline-limit=183
should be enough.
More information about the Gcc-bugs
mailing list