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: [vta, vta4.4] merged with trunk and 4.4 @149247, updated VTA patchset


On Jul  8, 2009, Richard Guenther <richard.guenther@gmail.com> wrote:

> On Tue, Jul 7, 2009 at 8:06 PM, Alexandre Oliva<aoliva@redhat.com> wrote:
>> On Jul Â7, 2009, Alexandre Oliva <aoliva@redhat.com> wrote:
>> Âindex_X = something;
>> Âpointer_Y = somearray + index_X;
>> Â# debug pointer => pointer_Y

>> Ideally, we'd like to substitute pointer_Y and then index_X, rather than
>> end up losing track of debug information. ÂThis would work if ssa-dce
>> walked stmts backwards in eliminate_unnecessary_stmt(), visiting
>> dominated blocks before their dominators.
>> 
>> I'm not sure this is the only situation in which this problem arises,
>> but would such an improvement be acceptable?

> Well, why not generate stuff at release_ssa_name time, for both
> index_X and pointer_Y.

Because we delete the index DEF first, without substituting it into the
pointer DEF.  When we get to the pointer DEF, we lose.

That's why there were tests for dead SSA names, and that's why reverting
the order of removal, at that point and at one other point, fixes the
problem.

> What you do in the hunk I complained about is completely unsafe
> if you ever hit dead SSA names.

We shouldn't hit dead SSA names.  All known cases were ones of *dying*
SSA names.  Can you think of others?

For the known cases, reverting the order of removal of SSA names works.
(just tested)

-- 
Alexandre Oliva, freedom fighter    http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/   FSF Latin America board member
Free Software Evangelist      Red Hat Brazil Compiler Engineer


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