This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Question on fixup_abnormal_edges
Jan Hubicka wrote:
> >
> >
> > Jan Hubicka wrote:
> > > I think we should make reload to recognize that given insn never
> > > fallsthru and avoid it from generating such dead code. Even in case of
> > > USE it is wrong and here as well. What is the last insn in the basic
> > > block?
> >
> > The same as the previous one:
> >
> > Breakpoint 2, fixup_abnormal_edges () at ../../src/gcc/reload1.c:9522
> > 9522 && insn != bb->head)
> >
> > (gdb) list
> >
> > 9518 /* Get past the new insns generated. Allow notes, as the insns may
> > 9519 be already deleted. */
> > 9520 while ((GET_CODE (insn) == INSN || GET_CODE (insn) == NOTE)
> > 9521 && !can_throw_internal (insn)
> > 9522 && insn != bb->head)
> > 9523 insn = PREV_INSN (insn);
> > 9524 if (GET_CODE (insn) != CALL_INSN && !can_throw_internal (insn))
> > 9525 abort ();
> > 9526 bb->end = insn;
> >
> > (gdb) p e
> > $1 = 0x0
> >
> > (gdb) pr bb->end
> > (insn 2134 444 445 (set (reg:DI 22 $22)
> > (mem:DI (plus:DI (reg/f:DI 29 $29)
> > (const_int 640 [0x280])) [48 S8 A64])) 244 {*movdi_nofix} (nil)
> > (nil))
>
> Can you print the whole BB using debug_bb? This still looks like
> reloading, so the instruction requiring the reload is probably earlier.
Sure:
(gdb) call debug_bb (bb)
;; Basic block 50, loop depth 0, count 0
;; Predecessors: 49 [50.0%] (fallthru)
;; Registers live at start: 26 [$26] 29 [$29] 30 [$30] 155 347
(note 1464 437 2045 [bb 50] NOTE_INSN_BASIC_BLOCK)
(note 2045 1464 441 0x40539c00 NOTE_INSN_BLOCK_END)
(insn 441 2045 443 (set (reg:DI 16 $16)
(reg:DI 2 $2 [155])) 244 {*movdi_nofix} (nil)
(nil))
(insn 443 441 2133 (set (reg:DI 25 $25)
(const_int 1 [0x1])) 244 {*movdi_nofix} (insn_list:REG_DEP_ANTI 441 (nil))
(expr_list:REG_EQUAL (const_int 1 [0x1])
(nil)))
(insn 2133 443 444 (set (mem:DI (plus:DI (reg/f:DI 29 $29)
(const_int 640 [0x280])) [48 S8 A64])
(reg:DI 22 $22)) 244 {*movdi_nofix} (nil)
(nil))
(call_insn 444 2133 2134 (parallel[
(call (mem:DI (symbol_ref:DI ("ada__exceptions__reraise_occurrence_no_defer")) [0 S8 A64])
(const_int 1 [0x1]))
(use (const_int 0 [0x0]))
(use (reg:DI 25 $25))
(use (reg:DI 26 $26))
(clobber (reg:DI 27 $27))
] ) 211 {*call_vms_1} (insn_list 443 (insn_list 441 (nil)))
(expr_list:REG_EH_REGION (const_int 16 [0x10])
(expr_list:REG_NORETURN (const_int 0 [0x0])
(nil)))
(expr_list (use (reg:DI 16 $16))
(nil)))
(insn 2134 444 445 (set (reg:DI 22 $22)
(mem:DI (plus:DI (reg/f:DI 29 $29)
(const_int 640 [0x280])) [48 S8 A64])) 244 {*movdi_nofix} (nil)
(nil))
;; Registers live at end: 29 [$29] 30 [$30] 31 [AP] 63 [FP] 347
;; Successors: 51 [100.0%] (ab,abcall,eh)
> What target do you use?
alpha-dec-openvms7.1
gcc version 3.2 2002-07-26 (prerelease) + our internal GNAT tree.