This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: RFC -- update_equiv_regs and friends
- To: gcc at gcc dot gnu dot org
- Subject: Re: RFC -- update_equiv_regs and friends
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- Date: Sun, 4 Mar 2001 11:04:02 -0500 (EST)
- Cc: law at redhat dot com, john at feith dot com
> Not surprisingly I've been thinking more about this code in the last couple
> days, and I can't convince myself the code to deal with dying registers
> in notes for local-alloc is correct either.
>
> While I believe it handles the case where the death note is on the equiv
> insn, I don't believe it handles the case where the death note is on a
> later insn. ie consider something like this
>
> insn A where we have an equivalence referencing register X
> ...
> insn B where register X dies
> ...
> insn C where we use the result of insn A.
>
> If we substitute the equivalence from A into C, then we lose because we've
> changed the lifetime of register X.
In looking at the problems arising from the substitution og LO_SUM MEMs
generated by the PA port for pic references, I had come to the same
conclusion.
The function rtx_varies_p used in update_equiv_regs only determines
whether a rtx varies at the location where the rtx is used in the
code. There is no guarantee that an equivalence determined at A
will still be valid at C. I previously submitted a patch to change
at least some of the code in update_equiv_regs to use rtx_unstable_p
instead of rtx_varies_p. This provides a proper test to determine
whether a equivalence valid at A is still valid at C. See
<http://gcc.gnu.org/ml/gcc-patches/2001-02/msg01187.html>.
See also
<http://gcc.gnu.org/ml/gcc/2001-02/msg00769.html>.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)