------- Comment #38 from hubicka at ucw dot cz 2006-08-19 00:19 -------
Subject: Re: [4.1/4.2 regression] A file that can not be compiled in
reasonable time/space
At -O0 we get time sinks:
life analysis : 0.75 (10%) usr 0.01 ( 3%) sys 0.78 ( 9%) wall
2714 kB ( 4%) ggc
expand : 1.46 (15%) usr 0.04 (11%) sys 1.66 (15%) wall
37656 kB (58%) ggc
local alloc : 1.40 (14%) usr 0.04 (11%) sys 1.45 (13%) wall
1293 kB ( 2%) ggc
global alloc : 3.55 (36%) usr 0.05 (14%) sys 3.67 (34%) wall
7509 kB (12%) ggc
final : 0.96 (10%) usr 0.04 (11%) sys 1.00 ( 9%) wall
1157 kB ( 2%) ggc
TOTAL : 9.95 0.35 10.77
64543 kB
Expand seems resonable given that almost everything is call that has
long representation.
Global alloc is copying important portion of insn stream because of:
/* If we aren't replacing things permanently and we changed something,
make another copy to ensure that all the RTL is new. Otherwise
things can go wrong if find_reload swaps commutative operands
and one is inside RTL that has been copied while the other is not. */
new_body = old_body;
if (! replace)
{
new_body = copy_insn (old_body);
if (REG_NOTES (insn))
REG_NOTES (insn) = copy_insn_1 (REG_NOTES (insn));
}
and few other occurences of copy_insn in reload1.c. They seems to copy
quite a lot of unnecesary RTL "just for sure". Also virtual register
ellimination produce a lot of duplicated RTL, perhaps it can be cached?
global alloc also spend 50% of time by clearing out
reg_has_output_reload. I am testing patch that fix that.
global alloc : 1.51 (19%) usr 0.07 (20%) sys 1.60 (18%) wall
7509 kB (12%) ggc
Final is spending all it's time in shorten branches, that are not needed
at all.
Honza
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28071