[tree-ssa] copy prop vs. debugging

law@redhat.com law@redhat.com
Thu Jul 3 16:51:00 GMT 2003


In message <wvlof0bvdws.fsf@prospero.boston.redhat.com>, Jason Merrill writes:
 >When a temporary is copied into a variable, any dominated uses of that
 >variable are replaced with uses of the temporary.  If all uses are
 >dominated by such a copy, the variable is removed.  This obviously hurts
 >debugging.
 >
 >This isn't a major problem in the current tree, but a patch I'm working
 >on to always evaluate non-trivial expressions into temps causes it to
 >happen much more frequently; now pretty much any modification of a user
 >variable is a copy.
Yes.  I've been pondering this as well -- I first noticed this effect
when forcing the LHS of a MODIFY_EXPR to be a temporary if the RHS could
throw.

 >I can think of two ways to address this:
 >
 >1) When coalescing, try to replace temps with user variables which are
 >   copied from them.  This is an incomplete solution, but might be simpler
 >   than:
In the cases I was looking at, this was going to be reasonably effective.
It's simply a matter of adding this support to the coalescer.

Jeff



More information about the Gcc mailing list