[Bug tree-optimization/54146] Very slow compile with attribute((flatten))

2012-08-07 Thread steven at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54146 --- Comment #31 from Steven Bosscher 2012-08-08 06:28:16 UTC --- Author: steven Date: Wed Aug 8 06:28:10 2012 New Revision: 190222 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190222 Log: PR middle-end/54146 * ifcvt.c: Include

[Bug tree-optimization/54146] Very slow compile with attribute((flatten))

2012-08-07 Thread steven at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54146 --- Comment #31 from Steven Bosscher 2012-08-08 06:28:16 UTC --- Author: steven Date: Wed Aug 8 06:28:10 2012 New Revision: 190222 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190222 Log: PR middle-end/54146 * ifcvt.c: Include

[Bug tree-optimization/54146] Very slow compile with attribute((flatten))

2012-08-07 Thread steven at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54146 --- Comment #30 from Steven Bosscher 2012-08-07 22:36:30 UTC --- > Created attachment 27957 [details] With the attachment, time spent in rewrite_into_loop_closed_ssa is almost 0 (and that includes the time in the verifier). Compile time for the

[Bug tree-optimization/54146] Very slow compile with attribute((flatten))

2012-08-07 Thread steven at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54146 --- Comment #29 from Steven Bosscher 2012-08-07 22:28:11 UTC --- Created attachment 27957 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27957 Do not traverse sibling loops The idea here is to note that for a nested loop we know for sure th

[Bug tree-optimization/54146] Very slow compile with attribute((flatten))

2012-08-07 Thread steven at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54146 --- Comment #28 from Steven Bosscher 2012-08-07 19:58:00 UTC --- To illustrate the rewrite_into_closed_loop_ssa problem, consider this test case: extern void use1 (int); extern void use2 (int); extern int confuse_loop (void); void foo (void) {

[Bug tree-optimization/54146] Very slow compile with attribute((flatten))

2012-08-07 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54146 Richard Guenther changed: What|Removed |Added CC||jamborm at gcc dot gnu.org --- Comment

[Bug tree-optimization/54146] Very slow compile with attribute((flatten))

2012-08-06 Thread steven at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54146 --- Comment #26 from Steven Bosscher 2012-08-06 22:58:22 UTC --- (In reply to comment #25) > 185939 is the number of basic blocks that end up in livein. That is a bitmap, > so most time is spent in traversing bitmap linked lists. Oh, and this do

[Bug tree-optimization/54146] Very slow compile with attribute((flatten))

2012-08-06 Thread steven at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54146 --- Comment #25 from Steven Bosscher 2012-08-06 22:42:12 UTC --- (In reply to comment #21) > The tree loop optimizers spend 285s out of 1360s total compile time (with my > flatten hack and ifcvt patch applied) in compute_global_livein. That's 21%

[Bug tree-optimization/54146] Very slow compile with attribute((flatten))

2012-08-06 Thread steven at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54146 --- Comment #24 from Steven Bosscher 2012-08-06 20:55:37 UTC --- (In reply to comment #23) > Created attachment 27953 [details] Needs this extra bit: diff -u ira.c ira.c --- ira.c (working copy) +++ ira.c (working copy) @@ -3539,7 +

[Bug tree-optimization/54146] Very slow compile with attribute((flatten))

2012-08-06 Thread steven at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54146 --- Comment #23 from Steven Bosscher 2012-08-06 20:22:02 UTC --- Created attachment 27953 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27953 Be memory friendlier in build_insn_chain My first ever reload patch! :-)

[Bug tree-optimization/54146] Very slow compile with attribute((flatten))

2012-08-06 Thread steven at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54146 --- Comment #22 from Steven Bosscher 2012-08-06 19:36:35 UTC --- IRA/reload spends a rather significant amount of time here: FOR_EACH_BB_REVERSE (bb) { bitmap_iterator bi; rtx insn; CLEAR_REG_SET (live_relevant_regs); -

[Bug tree-optimization/54146] Very slow compile with attribute((flatten))

2012-08-06 Thread steven at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54146 --- Comment #21 from Steven Bosscher 2012-08-06 15:36:04 UTC --- (In reply to comment #20) Yay, it's always nice to be right the first time when diagnosing a problem. The tree loop optimizers spend 285s out of 1360s total compile time (with my

[Bug tree-optimization/54146] Very slow compile with attribute((flatten))

2012-08-06 Thread stevenb.gcc at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54146 --- Comment #20 from stevenb.gcc at gmail dot com 2012-08-06 09:09:02 UTC --- On Mon, Aug 6, 2012 at 10:45 AM, rguenth at gcc dot gnu.org wrote: > Ick, I suppose similar issues exist on the tree level for passes that > think that memory / compile

[Bug tree-optimization/54146] Very slow compile with attribute((flatten))

2012-08-06 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54146 --- Comment #19 from Richard Guenther 2012-08-06 08:45:12 UTC --- (In reply to comment #17) > (In reply to comment #14) > > if-conversion : 177.26 (but due to loop_optimizer_init) > > Hmm, this is not loop_optimizer_init. All time i

[Bug tree-optimization/54146] Very slow compile with attribute((flatten))

2012-08-05 Thread steven at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54146 --- Comment #18 from Steven Bosscher 2012-08-05 21:13:26 UTC --- Created attachment 27946 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27946 Speed up ifcvt.c:check_cond_move_block This speeds up the pre-reload if-conversion passes by usin

[Bug tree-optimization/54146] Very slow compile with attribute((flatten))

2012-08-05 Thread steven at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54146 --- Comment #17 from Steven Bosscher 2012-08-05 18:48:55 UTC --- (In reply to comment #14) > if-conversion : 177.26 (but due to loop_optimizer_init) Hmm, this is not loop_optimizer_init. All time is spent in the two memset calls in

[Bug tree-optimization/54146] Very slow compile with attribute((flatten))

2012-08-05 Thread steven at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54146 Steven Bosscher changed: What|Removed |Added Attachment #27917|0 |1 is obsolete|

[Bug tree-optimization/54146] Very slow compile with attribute((flatten))

2012-08-03 Thread matz at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54146 --- Comment #15 from Michael Matz 2012-08-03 14:43:14 UTC --- Author: matz Date: Fri Aug 3 14:43:09 2012 New Revision: 190126 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190126 Log: PR tree-optimization/54146 * cfgexpand.c (ad

[Bug tree-optimization/54146] Very slow compile with attribute((flatten))

2012-08-03 Thread steven at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54146 --- Comment #14 from Steven Bosscher 2012-08-03 08:59:29 UTC --- Created attachment 27930 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27930 Do not inline_merge_summary if called via flatten_function As I noted in comment #12, the flatten

[Bug tree-optimization/54146] Very slow compile with attribute((flatten))

2012-08-02 Thread rguenther at suse dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54146 --- Comment #13 from rguenther at suse dot de 2012-08-02 10:35:56 UTC --- On Thu, 2 Aug 2012, steven at gcc dot gnu.org wrote: > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54146 > > Steven Bosscher changed: > >What|Removed

[Bug tree-optimization/54146] Very slow compile with attribute((flatten))

2012-08-02 Thread steven at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54146 Steven Bosscher changed: What|Removed |Added Component|middle-end |tree-optimization Summary|Ve