This is the mail archive of the gcc@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]

Rematerialization and Live Range Splitting on Region Frequency


Hello All:

Looks like Live range splitting and rematerialization are connected to each other. If  the boundary of Live range
Splitting is in the high frequency of the region then the move connected to splitted live ranges are inside the
High frequency region which is the performance bottleneck for many benchmarks.

Live range splitting based on the frequency of the region should be considered. The Live range splitting in the 
High frequency region is beneficial if the splitted live range is assigned the color(hard registers) which is better
Spilling inside the high frequency region, although there will be move instruction or shuffle code which is still 
Better.  If one of the splitted live range does not have any use points and all the partner live ranges gets the
Hard register, then the move instruction due to splitting will be costly for the high frequency region. In such 
Case the  split point should be move up at the boundary of the transition from low frequency region to high
Frequency region, and the splitted live ranges still get hard registers.  This require increment check of 
colorabity which increases the compile time but beneficial with respect to run time. The above heuristic should 
be incorporated on top of the below  Live range splitting Algorithm. Live range splitting algorithm should  consider
the blocks in the decreasing order of frequency with the first block should be taken from the high frequency
region and incrementally updates till it become colorable. Thus split points should be at the edge of the transition 
from high frequency to low frequency region or from low frequency region to high frequency region. 

The above Live range splitting should be incorporated  for all the flavors of Graph Coloring.

Regarding the rematerialization the Chaitin's Rematerialization try to recalculate the expression at all the 
Use points of the Live ranges and Simpson based approach for Rematerialized try to move the arithmetic
Instruction lower to use points or the basic blocks considering the operands of Arithmetic instructions is 
Not touched along the blocks of the Live range.

Considering all the effects of rematerialization, The remat point or the recalculation should be done at the
split points instead of Chaitin's approach of remat at every use points and the Simpson approach of operands
not being touched upon and the movement of arithmetic instruction later at the use points.

The above approaches looks feasible to implement consider the high frequency region into consideration.

Thoughts Please ?

Thanks & Regards
Ajit


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