On 07/02/2015 07:06 AM, Ajit Kumar Agarwal wrote:
Sorry for the typo error. I meant exits instead of exists.
The below is corrected.
The Cost Calculation for a candidate to Spill in the Integrated Register
Allocator(IRA) considers only the SESE regions.
The Cost Calculation in the IRA should consider the SEME regions into
consideration for spilling decisions.
IRA is a regional allocator. It spills pseudo in a region. Currently
regions are loops as the most important for optimizations. Loops can
have more one exit. So your assumption that IRA works on SESE region is
not accurate.
IRA with some work can be extended non-loop regions too. I am not sure
it will give significant improvement (LRA compensates partially this by
inheritance in EBBs) but it definitely will slowdown IRA whose speed
heavily depends on the number of regions (therefore a lot was done in
IRA to decrease regions number by merging regions with low register
pressure).
Of course, it would be interesting to implement non-loop regions in IRA
and see the results.
The Cost associated with the path that has un-matured exits should be less,
thus making the more chances of spilling decision
In the path of un-matured exits. The path that has normal exit should be
having a higher cost than the cost of un-matured
exit and Spilling decisions has to made accordingly in order to spill inside
the less frequency path with the un-matured exits
than the high frequency Path with the normal exits.
I would like to propose the above for consideration of cost associated with
SEME regions in IRA.
IRA uses standard GCC evaluation of edge and BB execution frequencies,
static (see predict.c) or based on execution profile (see *profile.c).
Without profile usage it might be inaccurate. May be it can be
improved. For me it has more sense to work on this code instead of
working on IRA code only.