This is the mail archive of the
mailing list for the GCC project.
Re: Optimal Coalescing with respect to move instruction for Live range splitting
- From: Vladimir Makarov <vmakarov at redhat dot com>
- To: Ajit Kumar Agarwal <ajit dot kumar dot agarwal at xilinx dot com>, "law at redhat dot com" <law at redhat dot com>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Cc: Vinod Kathail <vinodk at xilinx dot com>, Shail Aditya Gupta <shailadi at xilinx dot com>, Vidhumouli Hunsigida <vidhum at xilinx dot com>, Nagaraju Mekala <nmekala at xilinx dot com>
- Date: Mon, 26 Jan 2015 14:47:27 -0500
- Subject: Re: Optimal Coalescing with respect to move instruction for Live range splitting
- Authentication-results: sourceware.org; auth=none
- References: <a1a3f5a1e3bf419cab570b2a6f61333d at BY2FFO11FD035 dot protection dot gbl>
On 2015-01-18 12:37 AM, Ajit Kumar Agarwal wrote:
It is difficult for me to understand what and how you will do this
exactly. If it is not a big work to implement this heuristic, I guess
you should try and see the result. If it works we can add it to the RA.
Register allocation with two phase approach does optimal coalescing after the spilling. Sometime Live range splitting makes
the coalescing non optimal. The splitted Live range are connected by move instruction. Thus the Live range splitting and more
specifically aggressive Live range splitting increases the number of move instruction and making the coalescing
The optimal coalescing should take the frequency of the regions into consideration. The more the frequency of the region the cost
associated with the splitted live ranges will increase. If such cost increasing then we should do aggressive coalescing in this case and
remove the move instruction by associating the same color or hard registers associated with move instruction for the splitting live
I am think of adding such heuristics in the GCC Top Down Region based register allocator for the optimal coalescing, thereby reducing
the move instruction connected with the splitted Live ranges in the more frequently code.
Thoughts please ?