Live range splitting at each use points increases the number of live ranges that could be performance bottleneck. Split partner ranges could be assigned different registers increasing more copies. Increase in copies can be reduced using following methods.
a) Downward code motion of definition of registers before the use points and none of the instruction touched the defined registers. Such copies can be removed by replacing the destination registers in copy operation at the use points and copy can be removed.
For example N1: R2 = r3;
.. ..
N2:... =useofR2.
In this example if R2 is not touched between N1 and N2 points the copy can be removed using r3 at N2 point instead of R2. This can be achieved by downward code motions.
2. Upward code motion of use points near to the copy and the same reasons the intermediate instructions is not touching the destination registers of copy. The copy operation can be removed in such cases.
Due to the above method copy operations can be removed and live ranges created by splitting at each use point are reduced.
Doing Live range splitting at each use points will not increase register pressure but may release register pressure with more coloring chances. The only way it can increase register pressure is through generation of copy operations that is also reduced. These copies can occur inside the loops. Such copies inside the loops can be reduced by downward and upward code motion at loop boundaries.
Other advantage if the number of use points for a given definition is less, greater distance between the def points and use points create longer live ranges increasing register pressure. Such register pressure is reduced by assigning such Live ranges in memory.
Live range splitting at each use points is also beneficial for SSA representation. In SSA representation each use will have one def. In each merged control paths, the live ranges are disjoint because of renaming of virtual operands. This increase more cases of chordal graph that can be colored or assigned registers.
Different approaches for live range splitting have been proposed like splitting at PHI points, but Live range splitting at each use points also takes care of splitting at each PHI. PHI nodes represent the one case of use points
•Live range splitting at each use point is unique and novel for SSA based IR and non-SSA based IR(DAG) due to the following
•Finer granularity of live ranges.
•Reduction of copies can be easily reduced by upward and downward code motion.
•Reduction in register pressure.
•Live range splitting at more granular level.
•Give better approximation with non SSA based approach.
•More the use points better results and allocations.
•Coloring of chordal graph is easier with SSA based approach.
•Better coloring heuristics.
•Easy implementation with covering dominator tree for SSA graphs and covering interference graph for non-SSA graphs.