subreg against register allocation?

Jeff Law law@redhat.com
Tue Jun 15 07:36:00 GMT 2010


On 06/14/10 11:58, Ian Lance Taylor wrote:
> "Amker.Cheng"<amker.cheng@gmail.com>  writes:
>
>    
>> Wondering whether possible to handle multi-word mode with more accuracy,
>> in either subreg or IRA pass?
>>      
> Yes, it is possible.  What you need to do is to write a split which
> turns the mult:DI insn into an insn which sets two separate subregs.
> The values for the two subregs will be written as shifts and truncates
> of the mult:DI; see, e.g.,<s>mul<mode>3_highpart in i386.md.  If you
> do that, then with luck the second lower subreg pass will be able to
> pull apart the values, and IRA will allocate them independently.  You
> want to write it as a split so that the RTL CSE and combine passes see
> the mult:DI, in case they can do anything with it.
>    
Note that lower-subreg is rather conservative when determining what 
subregs to lower, particularly when the pseudo appears in different 
modes (ie, some accesses are via SUBREGs, others are naked REGs).  So 
this approach may not necessarily work.

jeff



More information about the Gcc mailing list