public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/43632] New: -g option became very slow after r157834 @ 2010-04-02 19:38 roman at binarylife dot net 2010-04-02 19:42 ` [Bug c++/43632] " roman at binarylife dot net ` (7 more replies) 0 siblings, 8 replies; 9+ messages in thread From: roman at binarylife dot net @ 2010-04-02 19:38 UTC (permalink / raw) To: gcc-bugs $ svn up -r157834 ~/src/gcc ... $ make -C ~/src/gcc install ... $ time g++ -std=c++0x -O2 -c test.cpp -g real 4m47.882s user 4m47.226s sys 0m0.577s $ time g++ -std=c++0x -O2 -c test.cpp real 0m28.247s user 0m27.935s sys 0m0.282s For comparison: $ svn up -r157833 ~/src/gcc ... $ make -C ~/src/gcc install ... $ time g++ -std=c++0x -O2 -c test.cpp -g real 0m38.055s user 0m37.476s sys 0m0.475s $ time g++ -std=c++0x -O2 -c test.cpp real 0m28.149s user 0m27.861s sys 0m0.278s -- Summary: -g option became very slow after r157834 Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: roman at binarylife dot net GCC build triplet: x86_64-unknown-linux-gnu GCC host triplet: x86_64-unknown-linux-gnu GCC target triplet: x86_64-unknown-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43632 ^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/43632] -g option became very slow after r157834 2010-04-02 19:38 [Bug c++/43632] New: -g option became very slow after r157834 roman at binarylife dot net @ 2010-04-02 19:42 ` roman at binarylife dot net 2010-04-02 20:25 ` jakub at gcc dot gnu dot org ` (6 subsequent siblings) 7 siblings, 0 replies; 9+ messages in thread From: roman at binarylife dot net @ 2010-04-02 19:42 UTC (permalink / raw) To: gcc-bugs ------- Comment #1 from roman at binarylife dot net 2010-04-02 19:42 ------- Created an attachment (id=20293) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20293&action=view) test.cpp -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43632 ^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/43632] -g option became very slow after r157834 2010-04-02 19:38 [Bug c++/43632] New: -g option became very slow after r157834 roman at binarylife dot net 2010-04-02 19:42 ` [Bug c++/43632] " roman at binarylife dot net @ 2010-04-02 20:25 ` jakub at gcc dot gnu dot org 2010-04-02 20:26 ` [Bug rtl-optimization/43632] [4.5 Regression] " rguenth at gcc dot gnu dot org ` (5 subsequent siblings) 7 siblings, 0 replies; 9+ messages in thread From: jakub at gcc dot gnu dot org @ 2010-04-02 20:25 UTC (permalink / raw) To: gcc-bugs ------- Comment #2 from jakub at gcc dot gnu dot org 2010-04-02 20:24 ------- The function is huge, > 2000 basic blocks, tracking almost 7000 preserved VALUEs. Most of the time is spent in vt_find_locations (understandably with so many bbs), but the hash table sizes don't grow quickly enough to trigger maximum hash table size limit. You can certainly compile with --param max-vartrack-size=10000000 or something similar, or -fno-var-tracking-assignments as a workaround. -- jakub at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aoliva at gcc dot gnu dot | |org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43632 ^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/43632] [4.5 Regression] -g option became very slow after r157834 2010-04-02 19:38 [Bug c++/43632] New: -g option became very slow after r157834 roman at binarylife dot net 2010-04-02 19:42 ` [Bug c++/43632] " roman at binarylife dot net 2010-04-02 20:25 ` jakub at gcc dot gnu dot org @ 2010-04-02 20:26 ` rguenth at gcc dot gnu dot org 2010-04-02 21:04 ` ebotcazou at gcc dot gnu dot org ` (4 subsequent siblings) 7 siblings, 0 replies; 9+ messages in thread From: rguenth at gcc dot gnu dot org @ 2010-04-02 20:26 UTC (permalink / raw) To: gcc-bugs ------- Comment #3 from rguenth at gcc dot gnu dot org 2010-04-02 20:26 ------- Confirmed. -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Component|c++ |rtl-optimization Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2010-04-02 20:26:03 date| | Summary|-g option became very slow |[4.5 Regression] -g option |after r157834 |became very slow after | |r157834 Target Milestone|--- |4.5.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43632 ^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/43632] [4.5 Regression] -g option became very slow after r157834 2010-04-02 19:38 [Bug c++/43632] New: -g option became very slow after r157834 roman at binarylife dot net ` (2 preceding siblings ...) 2010-04-02 20:26 ` [Bug rtl-optimization/43632] [4.5 Regression] " rguenth at gcc dot gnu dot org @ 2010-04-02 21:04 ` ebotcazou at gcc dot gnu dot org 2010-04-03 17:18 ` rguenth at gcc dot gnu dot org ` (3 subsequent siblings) 7 siblings, 0 replies; 9+ messages in thread From: ebotcazou at gcc dot gnu dot org @ 2010-04-02 21:04 UTC (permalink / raw) To: gcc-bugs ------- Comment #4 from ebotcazou at gcc dot gnu dot org 2010-04-02 21:03 ------- Another datapoint: I now get WARNING: program timed out. FAIL: gcc.c-torture/compile/limits-fnargs.c -O3 -g (test for excess errors) consistently on a somewhat old machine. It hadn't showed up for months (years?). -- ebotcazou at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ebotcazou at gcc dot gnu dot | |org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43632 ^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/43632] [4.5 Regression] -g option became very slow after r157834 2010-04-02 19:38 [Bug c++/43632] New: -g option became very slow after r157834 roman at binarylife dot net ` (3 preceding siblings ...) 2010-04-02 21:04 ` ebotcazou at gcc dot gnu dot org @ 2010-04-03 17:18 ` rguenth at gcc dot gnu dot org 2010-04-06 10:08 ` jakub at gcc dot gnu dot org ` (2 subsequent siblings) 7 siblings, 0 replies; 9+ messages in thread From: rguenth at gcc dot gnu dot org @ 2010-04-03 17:18 UTC (permalink / raw) To: gcc-bugs -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |P2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43632 ^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/43632] [4.5 Regression] -g option became very slow after r157834 2010-04-02 19:38 [Bug c++/43632] New: -g option became very slow after r157834 roman at binarylife dot net ` (4 preceding siblings ...) 2010-04-03 17:18 ` rguenth at gcc dot gnu dot org @ 2010-04-06 10:08 ` jakub at gcc dot gnu dot org 2010-04-06 11:28 ` rguenth at gcc dot gnu dot org 2010-06-04 19:34 ` [Bug rtl-optimization/43632] [4.5/4.6 " jakub at gcc dot gnu dot org 7 siblings, 0 replies; 9+ messages in thread From: jakub at gcc dot gnu dot org @ 2010-04-06 10:08 UTC (permalink / raw) To: gcc-bugs ------- Comment #5 from jakub at gcc dot gnu dot org 2010-04-06 10:07 ------- callgrind --inclusive=yes says on this: 438,822,838,411 /usr/src/gcc/obj/gcc/../../gcc/var-tracking.c:variable_tracking_main 429,638,024,208 /usr/src/gcc/obj/libiberty/../../libiberty/hashtab.c:htab_traverse_noresize [/usr/src/gcc/obj/gcc/cc1plus] 428,305,658,767 /usr/src/gcc/obj/libiberty/../../libiberty/hashtab.c:htab_traverse [/usr/src/gcc/obj/gcc/cc1plus] 417,506,443,433 ../../gcc/var-tracking.c:vt_find_locations [/usr/src/gcc/obj/gcc/cc1plus] 389,486,317,740 ../../gcc/var-tracking.c:dataflow_set_merge [/usr/src/gcc/obj/gcc/cc1plus] 389,242,104,098 /usr/src/gcc/obj/gcc/../../gcc/var-tracking.c:variable_merge_over_cur 389,242,104,098 ../../gcc/var-tracking.c:variable_merge_over_cur [/usr/src/gcc/obj/gcc/cc1plus] 345,572,722,020 ../../gcc/var-tracking.c:intersect_loc_chains [/usr/src/gcc/obj/gcc/cc1plus] 292,844,158,243 ../../gcc/var-tracking.c:find_loc_in_1pdv [/usr/src/gcc/obj/gcc/cc1plus] 117,800,020,698 /usr/src/gcc/obj/gcc/../../gcc/rtl.c:rtx_equal_p 117,800,020,698 ../../gcc/rtl.c:rtx_equal_p [/usr/src/gcc/obj/gcc/cc1plus] 78,786,470,332 /usr/src/gcc/obj/libiberty/../../libiberty/hashtab.c:htab_find_with_hash [/usr/src/gcc/obj/gcc/cc1plus] so, as a micro-optimization what could work is use the spare bits in location_chain_def (30 bits on 32-bit hosts, 32 + 30 bits on 64-bit hosts) for something we could compare quickly in place of rtx_equal_p resp. loc_cmp. Say, having two or 3 topmost bits of those 30 for code (0 for REG, 1 for MEM, 2 for VALUE, 3 for anything else) and for each code encode something in the other bits (e.g. REGNO for REG, 2 bits REG/MEM/VALUE/other for MEM's address than the rest of bits, saturating VALUE uid for VALUEs, something else for other codes). Then we'd call rtx_equal_p or loc_cmp only if two values are equal. Or better find a way how to do less work during dataflow merges. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43632 ^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/43632] [4.5 Regression] -g option became very slow after r157834 2010-04-02 19:38 [Bug c++/43632] New: -g option became very slow after r157834 roman at binarylife dot net ` (5 preceding siblings ...) 2010-04-06 10:08 ` jakub at gcc dot gnu dot org @ 2010-04-06 11:28 ` rguenth at gcc dot gnu dot org 2010-06-04 19:34 ` [Bug rtl-optimization/43632] [4.5/4.6 " jakub at gcc dot gnu dot org 7 siblings, 0 replies; 9+ messages in thread From: rguenth at gcc dot gnu dot org @ 2010-04-06 11:28 UTC (permalink / raw) To: gcc-bugs ------- Comment #6 from rguenth at gcc dot gnu dot org 2010-04-06 11:21 ------- GCC 4.5.0 is being released. Deferring to 4.5.1. -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|4.5.0 |4.5.1 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43632 ^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/43632] [4.5/4.6 Regression] -g option became very slow after r157834 2010-04-02 19:38 [Bug c++/43632] New: -g option became very slow after r157834 roman at binarylife dot net ` (6 preceding siblings ...) 2010-04-06 11:28 ` rguenth at gcc dot gnu dot org @ 2010-06-04 19:34 ` jakub at gcc dot gnu dot org 7 siblings, 0 replies; 9+ messages in thread From: jakub at gcc dot gnu dot org @ 2010-06-04 19:34 UTC (permalink / raw) To: gcc-bugs ------- Comment #7 from jakub at gcc dot gnu dot org 2010-06-04 19:34 ------- After the recent var-tracking.c PR41371 changes this is down to 67 seconds. -- jakub at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43632 ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2010-06-04 19:34 UTC | newest] Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2010-04-02 19:38 [Bug c++/43632] New: -g option became very slow after r157834 roman at binarylife dot net 2010-04-02 19:42 ` [Bug c++/43632] " roman at binarylife dot net 2010-04-02 20:25 ` jakub at gcc dot gnu dot org 2010-04-02 20:26 ` [Bug rtl-optimization/43632] [4.5 Regression] " rguenth at gcc dot gnu dot org 2010-04-02 21:04 ` ebotcazou at gcc dot gnu dot org 2010-04-03 17:18 ` rguenth at gcc dot gnu dot org 2010-04-06 10:08 ` jakub at gcc dot gnu dot org 2010-04-06 11:28 ` rguenth at gcc dot gnu dot org 2010-06-04 19:34 ` [Bug rtl-optimization/43632] [4.5/4.6 " jakub at gcc dot gnu dot 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).