aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.cc
diff options
context:
space:
mode:
authorSurya Kumari Jangala <jskumari@linux.ibm.com>2023-09-14 02:12:50 -0500
committerSurya Kumari Jangala <jskumari@linux.ibm.com>2023-09-19 20:52:34 -0500
commit677249a23243b5b51832611767366d6eb199bdc7 (patch)
tree4a2bfc759be6e5df71cc2df32fe73589b4e358aa /gcc/expr.cc
parentc44926fe2dc570103339dbb120914dabf655be07 (diff)
downloadgcc-677249a23243b5b51832611767366d6eb199bdc7.zip
gcc-677249a23243b5b51832611767366d6eb199bdc7.tar.gz
gcc-677249a23243b5b51832611767366d6eb199bdc7.tar.bz2
ira: Consider save/restore costs of callee-save registers [PR110071]
In improve_allocation() routine, IRA checks for each allocno if spilling any conflicting allocnos can improve the allocation of this allocno. This routine computes the cost improvement for usage of each profitable hard register for a given allocno. The existing code in improve_allocation() does not consider the save/restore costs of callee save registers while computing the cost improvement. This can result in a callee save register being assigned to a pseudo that is live in the entire function and across a call, overriding a non-callee save register assigned to the pseudo by graph coloring. So the entry basic block requires a prolog, thereby causing shrink wrap to fail. 2023-09-14 Surya Kumari Jangala <jskumari@linux.ibm.com> gcc/ PR rtl-optimization/110071 * ira-color.cc (improve_allocation): Consider cost of callee save registers. gcc/testsuite/ PR rtl-optimization/110071 * gcc.target/powerpc/pr110071.c: New test.
Diffstat (limited to 'gcc/expr.cc')
0 files changed, 0 insertions, 0 deletions