This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] Copy prop into virtual operands
- From: law at redhat dot com
- To: "Zack Weinberg" <zack at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 29 Jul 2003 13:12:29 -0600
- Subject: Re: [tree-ssa] Copy prop into virtual operands
- Reply-to: law at redhat dot com
In message <8765ll5j9d.fsf@egil.codesourcery.com>, "Zack Weinberg" writes:
>law@redhat.com writes:
>
>> 1. We only propagate SSA_NAMEs in the VUSES/VDEFs. Propagating a constan
>t
>> into a virtual operand seems extremely wrong to me.
>
>Could you explain why? Naively, it seems desirable to propagate
>constants everywhere one possibly can.
These are virtual operands and do not directly affect code generation. They
effectively carry aliasing information (and hopefully that's all they carry
now that Diego has made access to complex types create real operands
instead of virtual operands).
The whole point behind copy propagating into virtual operands is to
get to a point where you have identical looking loads which also have
the same virtual operands (including the same version # on all the
virtual variables). If you can get to that point, then you have identified
a redundant load.
Propagating constants just doesn't make a lot of sense. It's also the case
that the model we're going to shouldn't allow any equivalences between
virtual operands and constants (since to do that you would have had
a virtual operand assigned a constant value in the IL, which would imply
that we're mixing virtual and real operands). I don't think we're quite
their on the no-mixing, but we're getting real close.
jeff