This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] Fix variables getting out of their scope
- From: law at redhat dot com
- To: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- Cc: Daniel Berlin <dberlin at dberlin dot org>, Diego Novillo <dnovillo at redhat dot com>, Zdenek Dvorak <rakdver at kam dot mff dot cuni dot cz>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 21 Aug 2003 11:14:43 -0600
- Subject: Re: [tree-ssa] Fix variables getting out of their scope
- Reply-to: law at redhat dot com
In message <20030821170504.GA19924@atrey.karlin.mff.cuni.cz>, Zdenek Dvorak wri
tes:
>Hello,
>
>> >copy propagation may replace set to j with i, thus moving it out of its
>> >scope. Given that we may (??? not really sure whether we do it) assign
>> >the same stack slot to i, j and bla, this would cause a misscompilation.
>> Everything which goes into a stack slot (as opposed to be assigned a
>> pseudo register) should be marked as addressable -- which should in turn
>> prevent the object from being used for copy propagation. ie, it should
>> be a non-issue.
>
>probably in this particular case; but it would be anoying to have to
>care about that at every single optimization.
The optimizations should be primarily be ignoring anything that is not
SSA renamed -- there are a few exceptions, but as a general rule, ignore
things which are not renamed.
Which means that it's the job of the early part of the SSA path to expose
as much stuff as it can to the renamer, for example by scalarizing aggregate
access and the like.
jeff