------- Comment #7 from mkuvyrkov at gcc dot gnu dot org 2006-12-19 13:32 ------- Hi!
Sorry for the late response. The scheduler fails to process a basic block with barrier inside it. The basic block looks like this: - Basic block 2 - begin - <some insns> (insn:HI 14 12 16 2 (set (mem/f/c/i:SI (symbol_ref:SI ("cptr") <var_decl 0x20000000035e3c80 cptr>) [2 cptr+0 S4 A32]) (reg:SI 0 ax [orig:59 D.1637 ] [59])) 34 {*movsi_1} (nil) (nil)) (insn:HI 16 14 17 2 (trap_if (const_int 1 [0x1]) (const_int 6 [0x6])) 551 {trap} (nil) (nil)) (barrier:HI 17 16 18) (insn:HI 18 17 33 2 (parallel [ (set (reg/f:SI 7 sp) (plus:SI (reg/f:SI 7 sp) (const_int 16 [0x10]))) (clobber (reg:CC 17 flags)) ]) 146 {*addsi_1} (nil) (nil)) <some insns> - Basic block 2 - end - GCC 4.1 doesn't fail on this code solely because there is no trap - barrier pair generated for this testcase (if there were, it would have fail a bit later on the assert that not all insns were scheduled - barrier will be counted as insn but won't be scheduled). To the best of my knowledge, this issue should be dealt with in dead code eleminator as stated in cfgbuild.c: control_flow_insn_p (). Also there was a patch by Jan Hubicka (http://gcc.gnu.org/ml/gcc-patches/2004-01/msg03461.html) which would've likely fixed this problem. The part of that patch we need wasn't checked in due to some unknown reason. If this kind of basic block is acceptable during scheduler then I can post a patch that will make the scheduler handle the case properly. -- mkuvyrkov at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hubicka at ucw dot cz, | |mkuvyrkov at gcc dot gnu dot | |org AssignedTo|unassigned at gcc dot gnu |mkuvyrkov at gcc dot gnu dot |dot org |org Status|NEW |ASSIGNED Last reconfirmed|2006-11-15 08:46:40 |2006-12-19 13:32:50 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29841