public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/52066] New: IRA and reginfo initialization too expensive
@ 2012-01-31 13:21 jakub at gcc dot gnu.org
2012-01-31 13:25 ` [Bug middle-end/52066] " jakub at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-01-31 13:21 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52066
Bug #: 52066
Summary: IRA and reginfo initialization too expensive
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: jakub@gcc.gnu.org
On compilation of an empty file, we spend almost half of the runtime on
IRA and reginfo cost initialization.
Inlining reg_class_subset_p and reg_classes_intersect_p gives us at least tiny
part of compile time back, at the cost of some small code growth.
For --enable-checking=release x86_64-linux cc1:
~/timing --drop 20 -c 2500 ./cc1.vanilla empty.c -quiet
Strip out best and worst 500 realtime results
minimum: 0.006243475 sec real / 0.000018634 sec CPU
maximum: 0.032220578 sec real / 0.000203440 sec CPU
average: 0.006542800 sec real / 0.000036352 sec CPU
stdev : 0.000050402 sec real / 0.000004406 sec CPU
~/timing --drop 20 -c 2500 ./cc1 empty.c -quiet
Strip out best and worst 500 realtime results
minimum: 0.006115241 sec real / 0.000017569 sec CPU
maximum: 0.033226603 sec real / 0.000197238 sec CPU
average: 0.006384943 sec real / 0.000036349 sec CPU
stdev : 0.000049180 sec real / 0.000004284 sec CPU
readelf -WS cc1{.vanilla,} | grep '\text'
[12] .text PROGBITS 00000000004b21a0 0b21a0 78e7b4 00 AX
0 0 16
[12] .text PROGBITS 00000000004b21a0 0b21a0 78ed34 00 AX
0 0 16
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug middle-end/52066] IRA and reginfo initialization too expensive
2012-01-31 13:21 [Bug middle-end/52066] New: IRA and reginfo initialization too expensive jakub at gcc dot gnu.org
@ 2012-01-31 13:25 ` jakub at gcc dot gnu.org
2012-01-31 13:57 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-01-31 13:25 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52066
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-31 13:09:39 UTC ---
Created attachment 26531
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26531
patch
Patch to inline them. Quite ugly, but I can't use extern inline
__attribute__((gnu_inline)), because it uses static inline functions, and
unfortunately some callers of these functions can't include hard-reg-set.h
(targhooks.c).
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug middle-end/52066] IRA and reginfo initialization too expensive
2012-01-31 13:21 [Bug middle-end/52066] New: IRA and reginfo initialization too expensive jakub at gcc dot gnu.org
2012-01-31 13:25 ` [Bug middle-end/52066] " jakub at gcc dot gnu.org
@ 2012-01-31 13:57 ` rguenth at gcc dot gnu.org
2012-01-31 15:48 ` jakub at gcc dot gnu.org
2012-10-09 20:46 ` steven at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-01-31 13:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52066
--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-01-31 13:21:23 UTC ---
PR44440?
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug middle-end/52066] IRA and reginfo initialization too expensive
2012-01-31 13:21 [Bug middle-end/52066] New: IRA and reginfo initialization too expensive jakub at gcc dot gnu.org
2012-01-31 13:25 ` [Bug middle-end/52066] " jakub at gcc dot gnu.org
2012-01-31 13:57 ` rguenth at gcc dot gnu.org
@ 2012-01-31 15:48 ` jakub at gcc dot gnu.org
2012-10-09 20:46 ` steven at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-01-31 15:48 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52066
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-31 14:54:32 UTC ---
Created attachment 26535
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26535
i386 patch
Incremental patch to speed up i386 *CLASS_P macros. I agree it isn't as clean
as defining them using the subsets (now used just in rtl checking during
initialization), but seems to be faster. Timing with both patches:
~/timing --drop 20 -c 2500 ./cc1 empty.c -quiet
Strip out best and worst 500 realtime results
minimum: 0.006076317 sec real / 0.000018264 sec CPU
maximum: 0.034520375 sec real / 0.000205298 sec CPU
average: 0.006284155 sec real / 0.000036616 sec CPU
stdev : 0.000048897 sec real / 0.000004400 sec CPU
[12] .text PROGBITS 00000000004b21a0 0b21a0 78e774 00 AX
0 0 16
(i.e. it completely undoes all the code growth by the first patch).
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug middle-end/52066] IRA and reginfo initialization too expensive
2012-01-31 13:21 [Bug middle-end/52066] New: IRA and reginfo initialization too expensive jakub at gcc dot gnu.org
` (2 preceding siblings ...)
2012-01-31 15:48 ` jakub at gcc dot gnu.org
@ 2012-10-09 20:46 ` steven at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: steven at gcc dot gnu.org @ 2012-10-09 20:46 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52066
Steven Bosscher <steven at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |steven at gcc dot gnu.org
--- Comment #4 from Steven Bosscher <steven at gcc dot gnu.org> 2012-10-09 20:46:39 UTC ---
(In reply to comment #1)
> Patch to inline them. Quite ugly, but I can't use extern inline
> __attribute__((gnu_inline)), because it uses static inline functions, and
> unfortunately some callers of these functions can't include hard-reg-set.h
> (targhooks.c).
Huh, if it's ok to know about reg-classes in targhooks, why is it not also OK
to know about HARD_REG_SET?
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-10-09 20:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-31 13:21 [Bug middle-end/52066] New: IRA and reginfo initialization too expensive jakub at gcc dot gnu.org
2012-01-31 13:25 ` [Bug middle-end/52066] " jakub at gcc dot gnu.org
2012-01-31 13:57 ` rguenth at gcc dot gnu.org
2012-01-31 15:48 ` jakub at gcc dot gnu.org
2012-10-09 20:46 ` steven at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).