This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

A few nits picked up my zacks rtl checking patches


Hi

Bootstrapping with Zacks rtl checking patches abort in a few places


1. delete_barrier_successors() jump.c ~line 2172

The following code is missing a "&& GET_CODE (PATTERN (insn)) == SET" 
before attempting to extract the SRC and DEST from the PATTERN. 
PATTERN (insn) may be a RETURN which has no rtl operands.

      /* Also remove (set (pc) (pc)) insns which can be created by
         gcse.  We eliminate such insns now to avoid having them
         cause problems later.  */
      else if (GET_CODE (insn) == JUMP_INSN
               && SET_SRC (PATTERN (insn)) == pc_rtx
               && SET_DEST (PATTERN (insn)) == pc_rtx)
        insn = delete_insn (insn);

2. unroll_loop() unroll.c ~line 646

The following code is missing a "&& GET_CODE (PREV_INSN
(last_loop_insn)) == JUMP_INSN"
before attempting to extract the JUMP_LABEL.

  if (unroll_type == UNROLL_NAIVE
      && GET_CODE (last_loop_insn) == BARRIER
      && start_label != JUMP_LABEL (PREV_INSN (last_loop_insn)))


3. mark_constant_pool() varasm.c ~line 3741

The following code aborts on the XSTR () when pool->constant is a
CONST_INT.
I'm not sure what the correct fix is here. I patched my local tree to
check if pool->constant is a CONST_INT and if it is skip it taking a
hint
from the handling of CONST_DOUBLE.


      /* skip CONST_DOUBLEs too - correct?  */
      if (GET_CODE (pool->constant) == CONST_DOUBLE)
	continue;

      label = XSTR (pool->constant, 0);


With these 3 modifications my x86-linux bootstrap configured with
"--enable-checking" 
with zacks rtl checking patches applied is looking good, its just
started the final
bootstrap stage.

Graham


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]