This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: [4.2 only] RFA: PR 33848: reload rematerialisation of labels


Eric Botcazou <ebotcazou@libertysurf.fr> writes:
>> Because (a) reload can turn a direct jump into an indirect jump with
>> a known target and (b) JUMP_LABEL should always be recomputable from
>> other information (as done by rebuild_jump_labels).  Without the note,
>> later passes would not be able to recompute the correct JUMP_LABEL.
>
> Agreed.  But what about jumps without JUMP_LABEL?  Your patch will
> change the behavior for them.

But that's the whole idea.  There should be no cases in which register
allocation (viewed as a black box) changes the JUMP_LABEL.  The only
reason we have this code is that, because of the direct->indirect change,
we can have insns whose patterns explicitly refer to the JUMP_LABEL
before reload but don't after it.  We then need to add a note so that
the insn still references the JUMP_LABEL in some form.

I'm struggling to understand what your objection is.  Could you give
me an example of the type of jump you think will be mishandled?
E.g. are you thinking of direct jumps, indirect jumps to known targets,
computed jumps, table jumps, or nonlocal jumps?

Richard


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