[Bug rtl-optimization/110071] improve_allocation() routine should consider save/restore cost of callee-save registers

2024-02-01 Thread jskumari at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110071

Surya Kumari Jangala  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #2 from Surya Kumari Jangala  ---
Fixed by the commit in comment 1.

[Bug rtl-optimization/110071] improve_allocation() routine should consider save/restore cost of callee-save registers

2024-02-01 Thread jskumari at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110071

Surya Kumari Jangala  changed:

   What|Removed |Added

   Last reconfirmed||2024-02-01
 Status|UNCONFIRMED |ASSIGNED
 Ever confirmed|0   |1

[Bug rtl-optimization/110071] improve_allocation() routine should consider save/restore cost of callee-save registers

2023-09-19 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110071

--- Comment #1 from CVS Commits  ---
The master branch has been updated by Surya Kumari Jangala
:

https://gcc.gnu.org/g:677249a23243b5b51832611767366d6eb199bdc7

commit r14-4162-g677249a23243b5b51832611767366d6eb199bdc7
Author: Surya Kumari Jangala 
Date:   Thu Sep 14 02:12:50 2023 -0500

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  

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.