]> git.ipfire.org Git - thirdparty/gcc.git/commit
[LRA]: Spill pseudos assigned to fp when fp->sp elimination became impossible
authorVladimir N. Makarov <vmakarov@redhat.com>
Wed, 16 Aug 2023 13:13:54 +0000 (09:13 -0400)
committerVladimir N. Makarov <vmakarov@redhat.com>
Wed, 16 Aug 2023 16:12:51 +0000 (12:12 -0400)
commit3452652236aa74995fa0f638d5ec3a3b53f8ad72
treef51814cb733ec32f6b3993c53e9d47104d040db7
parent083b7f2833d71dd940abcf9cfba99782cb7c07fd
[LRA]: Spill pseudos assigned to fp when fp->sp elimination became impossible

Porting LRA to AVR revealed that creating a stack slot can make fp->sp
elimination impossible.  The previous patches undoes fp assignment after
the stack slot creation but calculated wrongly live info after this.  This
resulted in wrong generation by deleting some still alive insns.  This
patch fixes this problem.

gcc/ChangeLog:

* lra-int.h (lra_update_fp2sp_elimination): Change the prototype.
* lra-eliminations.cc (spill_pseudos): Record spilled pseudos.
(lra_update_fp2sp_elimination): Ditto.
(update_reg_eliminate): Adjust spill_pseudos call.
* lra-spills.cc (lra_spill): Assign stack slots to pseudos spilled
in lra_update_fp2sp_elimination.
gcc/lra-eliminations.cc
gcc/lra-int.h
gcc/lra-spills.cc