https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110071

--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Surya Kumari Jangala
<jskum...@gcc.gnu.org>:

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

commit r14-4162-g677249a23243b5b51832611767366d6eb199bdc7
Author: Surya Kumari Jangala <jskum...@linux.ibm.com>
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  <jskum...@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.

Reply via email to