This is the mail archive of the gcc-patches@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: [PATCH, loop2_invariant, 1/2] Check only one register class


On 18 June 2014 05:49, Jeff Law <law@redhat.com> wrote:
> On 06/11/14 04:05, Zhenqiang Chen wrote:
>>
>> On 10 June 2014 19:06, Steven Bosscher <stevenb.gcc@gmail.com> wrote:
>>>
>>> On Tue, Jun 10, 2014 at 11:22 AM, Zhenqiang Chen wrote:
>>>>
>>>> Hi,
>>>>
>>>> For loop2-invariant pass, when flag_ira_loop_pressure is enabled,
>>>> function gain_for_invariant checks the pressures of all register
>>>> classes. This does not make sense since one invariant might impact
>>>> only one register class.
>>>>
>>>> The patch enhances functions get_inv_cost and gain_for_invariant to
>>>> check only the register pressure of the invariant if possible.
>>>
>>>
>>> This patch may work for targets with more-or-less orthogonal reg
>>> classes, but not if there is a lot of overlap between reg classes.
>>
>>
>> Yes. I need check the overlap between reg classes.
>>
>> Patch is updated to check all overlap reg classes by
>> reg_classes_intersect_p:
>
> Just so I'm sure I know what you're trying to do.
>
> You want to map the pseudo back to its likely class(es) then look at how
> those classes (and only those classes) would be impacted from a register
> pressure standpoint if the pseudo was hoisted as an invariant?

Yes.

> This is primarily achieved by returning the class of the invariant, then
> filtering out any non-intersecting classes in gain_for_invariant, right?

Yes. This is what I want to do since I found some invariant which
register class is NO_REGS (memory write) or SSE_REGS is blocked by
GENERAL_REGS' register pressure.

Thanks!
-Zhenqiang


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