This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PR debug/41229 [VTA] ssa-update former VUSEs-to-be in debug stmts
On Sep 4, 2009, Richard Guenther <richard.guenther@gmail.com> wrote:
> On Thu, Sep 3, 2009 at 10:47 PM, Alexandre Oliva<aoliva@redhat.com> wrote:
>> This patch checks for variables that need renaming in the bound
>> expressions in debug stmts and, if any are found, it updates the debug
>> stmt's operands, so that the reference becomes a regular USE, that will
>> be updated.
> What does this have to do with VOPs?
Maybe nothing. I assumed the VUSEs could be used to locate and adjust
the affected variables, limiting the effect only to relevant statements.
If that's not so, then clearly VOPs for debug insns won't help.
> # .MEM_2 = VUSE <.MEM_1(D)>
> i = 1;
> # DEBUG j => i
> IIRC, right? Now suppose i is no longer addressable and we mark i
> for rewriting into SSA form. That's your scenario, no?
Exactly.
> The key is that execute_update_addresses_taken updates all statements
> that have uses of the symbol and the operand scanner adds the bare
> symbols as regular uses. Thus the proper place for the fix is in
> execute_update_addresses_taken, the final loop conditional on
> update_vops (what a bad name now ...) that updates all stmts
> referencing memory (overkill of course). Just add to the overkill and
> update all debug stmts unconditionally.
I'm a bit concerned about updating all debug stmts, because this might
force some blocks to be updated that wouldn't be updated otherwise, and
this may lead to codegen differences. But I guess at least updating the
stmt is unavoidable, so I'll do that, and if there's fallout, I'll deal
with it.
Thanks for the suggestion, I'll implement the pre-approved patch, give
it a round of testing, and then post it and check it in if it passes.
--
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