This is the mail archive of the gcc@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/debugging vs reload-v2


On Tue, Apr 06, 2010 at 09:23:09AM -0600, Jeff Law wrote:
>>     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 :-)

As soon as you start doing simplifications, I'd say simplify_replace_fn_rtx
is the way to go.  In its current implementation, the callback is called on
each of the rtxs like with for_each_rtx.  Whenever you need to replace
something, you just return the replacement, otherwise return NULL meaning
no changes are needed.  The result is gong to be simplified only
when some argument of a rtx has actually changed.

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]