[Bug target/41399] [4.5 Regression] Scheduler gives huge dependence graph compiling fortran/intrinsic.c on ARM
--- Comment #24 from steven at gcc dot gnu dot org 2010-02-01 22:13 --- . -- steven at gcc dot gnu dot org changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41399
[Bug target/41399] [4.5 Regression] Scheduler gives huge dependence graph compiling fortran/intrinsic.c on ARM
--- Comment #23 from vmakarov at gcc dot gnu dot org 2010-02-01 19:52 --- Subject: Bug 41399 Author: vmakarov Date: Mon Feb 1 19:52:42 2010 New Revision: 156431 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=156431 Log: 2010-02-01 Vladimir Makarov PR target/41399 * sched-deps.c (sched_analyze_insn): Ignore fixed registers for implicitly set registers. Modified: trunk/gcc/ChangeLog trunk/gcc/sched-deps.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41399
[Bug target/41399] [4.5 Regression] Scheduler gives huge dependence graph compiling fortran/intrinsic.c on ARM
--- Comment #22 from steven at gcc dot gnu dot org 2010-01-29 22:46 --- FWIW: with the patch of comment #21 compile time goes down by a factor 10 and memory tops out at 107MB with the same x86_64 X armv5tejl-unknown-linux-gnueabi compiler as yesterday (but this time patched). -- steven at gcc dot gnu dot org changed: What|Removed |Added Keywords||patch http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41399
[Bug target/41399] [4.5 Regression] Scheduler gives huge dependence graph compiling fortran/intrinsic.c on ARM
--- Comment #21 from vmakarov at redhat dot com 2010-01-29 21:54 --- Thanks everyone who works on the bug. I am sorry that the bug was really introduced by my patch more accurately by the part which should fix reload crashes when the 1st scheduling works for some targets. The patch creates huge number dependencies on stack register (r13) which could be used for reloads according to *arm_movsi_insn. But pseudos can not be assigned the stack register because the register is fixed and we have not to add dependencies for the pseudo to fix the reload craches. The following small fix will solve the PR. Index: ../../gcc/gcc/sched-deps.c === --- ../../gcc/gcc/sched-deps.c (revision 155624) +++ ../../gcc/gcc/sched-deps.c (working copy) @@ -2623,6 +2623,7 @@ sched_analyze_insn (struct deps *deps, r extract_insn (insn); preprocess_constraints (); ira_implicitly_set_insn_hard_regs (&temp); + AND_COMPL_HARD_REG_SET (temp, ira_no_alloc_regs); IOR_HARD_REG_SET (implicit_reg_pending_clobbers, temp); } I'll submit the patch on Monday after some testing. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41399
[Bug target/41399] [4.5 Regression] Scheduler gives huge dependence graph compiling fortran/intrinsic.c on ARM
--- Comment #20 from rearnsha at gcc dot gnu dot org 2010-01-29 10:18 --- (In reply to comment #18) > Function that seems to cost the most time is add_functions(), which is one big > basic block of ~7500 insns (~500 of them call insns). > > List scheduling is quadratic in the number of insns per basic block. I don't > know the scheduler very well, but I would expect GCC has some kind of moving > window to limit the number of insns we consider for scheduling within a basic > block. If so, then this is broken now. > Sched-deps.c contains the following chunk of code: if (!deps->readonly && ((deps->pending_read_list_length + deps->pending_write_list_length) > MAX_PENDING_LIST_LENGTH)) { /* Flush all pending reads and writes to prevent the pending lists from getting any larger. Insn scheduling runs too slowly when these lists get long. When compiling GCC with itself, this flush occurs 8 times for sparc, and 10 times for m88k using the default value of 32. */ flush_pending_lists (deps, insn, false, true); } but presumably this is not being triggered any more. > That doesn't explain why only ARM seems to be hit by this, though. > -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41399
[Bug target/41399] [4.5 Regression] Scheduler gives huge dependence graph compiling fortran/intrinsic.c on ARM
--- Comment #19 from steven at gcc dot gnu dot org 2010-01-28 23:48 --- On ARM I have the following stats about the dependence graph for add_functions: Number of insns: 6630 Average number of sd_lists_size: 2512 For comparison, on atholon: Number of insns: 5640 Average number of sd_lists_size: 3.6 -- steven at gcc dot gnu dot org changed: What|Removed |Added Keywords||compile-time-hog Summary|[4.5 Regression] Internal |[4.5 Regression] Scheduler |error compiling |gives huge dependence graph |fortran/intrinsic.c |compiling ||fortran/intrinsic.c on ARM http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41399