On 04/06/10 00:35, Jakub Jelinek wrote:
On Mon, Apr 05, 2010 at 05:18:35PM -0600, Jeff Law wrote:
2. When renaming references from P to P' in a region, do take debug
insns in the region into account, renaming references in debug insns as
you would in any other insn.

OK.  So presumably the 2nd argument in a VAR_LOCATION can be any rtl
expression?  Meaning I have to parse it looking for things that need
changing?    Right?
   The problematic stuff is mainly when some RTL
with non-VOIDmode (REG, MEM etc.) needs to be replaced with a VOIDmode
constant - in that case simplify_replace_{,fn_}rtx needs to be used to
change the invalid RTL into valid.
These shouldn't be a problem.


    But I guess for reload2 you'll be
changing just REGs and MEMs to other REGs and MEMs - in that case
just a replacement through say for_each_rtx is possible too.
Yea, we're going to have to walk down the expression with for_each_rtx searching for REGs, then see if the REG we found needs replacing. Handling narrowing SUBREGs makes this marginally more complex, but it's still manageable. I just wanted to be sure there that there weren't any assumptions I could make to simplify the code :-)

jeff

Reply via email to