[Bug middle-end/38584] [4.3/4.4 Regression] Inline heuristics run even at -O0
steven at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sun Dec 21 00:35:00 GMT 2008
------- Comment #2 from steven at gcc dot gnu dot org 2008-12-21 00:33 -------
Created an attachment (id=16951)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16951&action=view)
Avoid expensive inline heuristics at O0, and speed up add_alias_set_conflicts
This problem is always going to be, at the core, that add_alias_set_conflicts
is a quadratic problem in the number of stack variables. But we can avoid
calculating this at -O0 for the inline heuristics but not for bin-packing stack
variables. And we can also try hard to make the quadratic loop as cheap as
possible.
Without this patch, for compiling the full test case (at -O0) my ia64 host
spends 952s in "callgraph optimizations", 1903s in "inline heuristics", and
1013s in "expand" (total 3868s).
With the patch, the numbers are 1s in "callgraph optimizations", 0s in "inline
heuristics", and 587s in "expand" (total 588s).
Given the nature of this unholy test case, I think the patch is close to the
final form I intend to submit, at least algorithmically. There are enough
areas left where we spend a lot more time...
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38584
More information about the Gcc-bugs
mailing list