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: [tree-ssa] Fix variables getting out of their scope


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


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