This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Allocating some Loop allocno in memory
- From: Ajit Kumar Agarwal <ajit dot kumar dot agarwal at xilinx dot com>
- To: "vmakarov at redhat dot com" <vmakarov at redhat 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: Sun, 11 Jan 2015 04:25:23 +0000
- Subject: Allocating some Loop allocno in memory
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=pass (sender IP is 149.199.60.83) smtp dot mailfrom=ajit dot kumar dot agarwal at xilinx dot com;
I was thinking of some of the opportunities with respect to reducing spills inside the Loop. If the Live range(allocno)
spans through the Loop and Live out at the exit of the Loop and there are no references or not being touched upon
inside the Loop, assign the allocno to the memory. This increase the chances of getting the register for other allocno
which spans through the Loop and have reference inside the Loop if the interference graph is not colorable.
Since allocno don't have references inside the Loop there won't be any load instructions with respect to restore inside
the loops. There will be a store instruction with respect to spill which will be outside the Loop. This will reduce the
conflicting edges of some of the allocno increasing the chances of making colorable of the Interference graph and
reduces the spills and restore inside the Loop.
This heuristics looks reasonable. This heuristics goes side by side with the Live range splitting across the Loop boundary.
On top of this heuristics, after the Live range splitting across the Loop boundary there interference graph is not colorable
then we can assign some of the splitted live ranges in the memory giving chances of registers for the Live ranges(allocno)
that spans the Loop and have reference inside the Loop.
We can change the cost of allocno in memory based on the above heuristics and take the above factor into consideration
for the cost calculation.
Thoughts Please?
Thanks & Regards
Ajit