On Mon, Aug 20, 2012 at 5:00 PM, Bin.Cheng <amker.ch...@gmail.com> wrote:
> Hi,
> Currently I am working on improving hoist pass by calculating register
> pressure and using the info to guide hoist process. It works well and
> I will send a patch once I finish it.
>
> In this work I reused codes in loop-invariant and called
> ira_set_pseudo_classes function to calculate register pressure. The
> problem is that ira_set_pseudo_classes sets pseudo_classes_defined_p
> to TRUE, which causes function find_costs_and_classes scans
> instructions only once to find the best reg class to use for each
> allocno.
>
> In my understanding, these part of codes is introduced for calculating
> reg pressure in schedulor and loop-invariant. What I do not understand
> is why we make IRA behave differently when register pressure is
> calculated before IRA pass?
>
> In the work of hoist, I found bigger regression in code size causes by
> the changed behavior of IRA.
>
> My questions are:
> 1. could somebody give some explanation on this.
> 2. Is it possible to calculate register pressure by reusing existing
> code while do not change behavior of IRA?
>
I realized it is designed in this way to ensure register pressure are
calculated and modeled in same way for loop-invariant/schedulor and
ira. But hoist is an early rtl pass and patterns/pseudo are changed a
lot from hoist to ira pass, it's better to not use classes for pseudo
registers. The data I collected from CSiBE support this point.

So how about I reset pseudo_classes_define_p after calculating
register pressure in hoist pass?

Any one give some comments? Thanks.
-- 
Best Regards.

Reply via email to