[vta, vta4.4] merged with trunk and 4.4 @149247, updated VTA patchset

Richard Guenther richard.guenther@gmail.com
Wed Jul 8 21:56:00 GMT 2009


On Wed, Jul 8, 2009 at 11:50 PM, Alexandre Oliva<aoliva@redhat.com> wrote:
> 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.

Well, ok.  I lost the context of my complaint though.

>> 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?

The interesting NULL type checks?

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

Ok.  Comments for that code will be appreciated.

Richard.



More information about the Gcc-patches mailing list