This is the mail archive of the 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: [PATCH, IRA] Fix ALLOCNO_MODE in the case of paradoxical subreg.

On 09/25/2013 02:00 PM, Wei Mi wrote:
>>  To define for what occurrence of the pseudo we should do the
>> transformation, we need to create allocnos and calculate reg classes to
>> know what paradoxical subreg needs more hard regs (the transformations
>> can not be done for all paradoxical subregs as my experience shows many
>> RTL changes result in worse RA even if we have heuristics to remove the
>> generated changes as in this case would be trying to assign the same
>> hard reg for the original and the new pseudo).
>>   After doing the transformations, we need to recalculate reg classes
>> and rebuild allocnos (both are expensive).  To speed up the process it
>> could be implemented as some kind of update of already existing data but
>> it will complicate code much.
> I see, thanks!
>> So right now I think implementing this in LRA would be easier  Still LRA
>> has a pretty good register (re-)allocation (although it is worse than in
>> IRA).
> When you get an idea how to fix it in LRA, if you are still busy, I
> would be happy to do the implementation if you could brief your idea.

Probably the best place to add a code for this is in
lra-constraints.c::simplify_operand_subreg by permitting subreg reload
for paradoxical subregs whose hard regs are not fully in allocno class
of the inner pseudo.

It needs a good testing (i'd check that the generated code is not
changed on variety benchmarks to see that the change has no impact on
the most programs performance) and you need to add a good comment
describing why this change is needed.

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