Fix nested functions

Ulrich Weigand weigand@i1.informatik.uni-erlangen.de
Sun Sep 26 10:45:00 GMT 2004


Jan Hubicka wrote:

> > The predicate *does* not allow a label_ref here, but it is never checked
> > because the insn isn't re-recognized any longer after your change.
> Is it?  I tought that there are two paths - one emitting and other
> validating the change.

Well, first the insn is simply changed in place:

          /* We don't normally have an insn matching (set (pc) (pc)), so
             check for this separately here.  We will delete such an
             insn below.

             For other cases such as a table jump or conditional jump
             where we know the ultimate target, go ahead and replace the
             operand.  While that may not make a valid insn, we will
             reemit the jump below (and also insert any necessary
             barriers).  */
          if (n_sets == 1 && dest == pc_rtx
              && (trial == pc_rtx
                  || (GET_CODE (trial) == LABEL_REF
                      && ! condjump_p (insn))))
            {
              SET_SRC (sets[i].rtl) = trial;
              cse_jumps_altered = 1;
              break;
            }

and later it is reemitted, which is supposed to heal all broken insns.
Except you switched off the reemitting ;-)

> In addition to this we have LABEL_REF_NONLOCAL_P flag and the LABEL_REF
> is reconstructed.

Hmm.  Is this completely redundant, or what's the point of having
to distinct mechanisms?

> I actually tried to fix this by making LABEL_REF_NONLOCAL_P copied too
> but this just moves us to another failures later, so disabling the
> transformation seems better alternative.

I agree that it should be disabled, but even the modification of
the insn should be disabled as well.

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  weigand@informatik.uni-erlangen.de



More information about the Gcc-patches mailing list