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] retain more debug info in loop-ivopts


On Sep  4, 2009, Richard Guenther <richard.guenther@gmail.com> wrote:

> On Fri, Sep 4, 2009 at 10:33 AM, Alexandre Oliva<aoliva@redhat.com> wrote:
>> On Sep Â3, 2009, Richard Guenther <richard.guenther@gmail.com> wrote:

>> That patch didn't work, because we removed DEFs in the wrong order.
>> Sometimes uses would survive in debug stmts.

>> Removing dominating DEFs after dominated ones fixes the problem.

> Why again does simply relying on release_ssa_name not work?

Same reason as elsewhere.

a_1 = whatever
b_2 = a_1 op whatever
# DEBUG b => b_2

Delete a_1 before b_2 and you end up with

# DEBUG b => a_1 op whatever

and then we die because a_1 is invalid.

Sure we could detect that a_1 is dead and reset the DEBUG stmt, but that
would be unnecessarily loss of debug info.

> Shouldn't propagate_var_def_into_debug_stmts deal with the situation
> and not propagate?

It could.  This would hide the unnecessary loss.

> That's why we have the find_released_ssa_name stuff there, no?

Yeah.  But it only hits when domination information is not available.
Ideally, we wouldn't need use it even then: setting up a bitmap of DEFs
to remove and perform the removal in topological order (as implemented
in this patch, or in any other way) is clearly a superior solution in
terms of retention of debug information, and also in terms of efficiency
in the removal of DEFs that might be referenced by debug info.

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