This is the mail archive of the
mailing list for the GCC project.
Re: Allocation of hotness of data structure with respect to the top of stack.
- 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>, Richard Biener <richard dot guenther at gmail dot com>, Jan Hubicka <hubicka at ucw dot cz>, "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: Thu, 09 Jul 2015 21:02:13 -0400
- Subject: Re: Allocation of hotness of data structure with respect to the top of stack.
- Authentication-results: sourceware.org; auth=none
- References: <37378DC5BCD0EE48BA4B082E0B55DFAA41F41485 at XAP-PVEXMBX02 dot xlnx dot xilinx dot com>
On 2015-07-05 7:11 AM, Ajit Kumar Agarwal wrote:
What can be done for this in RA was already done for LRA and reload
about seven years ago. More frequently used slots for spilled pseudos
are placed closer to the address base (stack pointer or frame pointer).
It gave considerable code size improvement and nice performance
improvement on x86/x86-64 as the displacements in 128 range needs less
memory in x86 insns. The details can be found in my presentation of IRA
or LRA on a GCC summit.
I am wondering allocation of hot data structure closer to the top of the stack increases the performance of the application.
The data structure are identified as hot and cold data structure and all the data structures are sorted in decreasing order of
The hotness and the hot data structure will be allocated closer to the top of the stack.
The load and store on accessing with respect to allocation of data structure on stack will be faster with allocation of hot
Data structure closer to the top of the stack.
Based on the above the code is generated with respect to load and store with the correct offset of the stack allocated on
the decreasing order of hotness.
Placement of local arrays and structures are actually done in
front-end. I remember the existence of the problem and that somebody
tried to address it but don't remember the result. You can try to
figure it out searching gcc mail archives.