Make ira call df_set_regs_ever_live for extra call-clobbered regs
authorRichard Sandiford <richard.sandiford@arm.com>
Mon, 30 Sep 2019 16:39:38 +0000 (16:39 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Mon, 30 Sep 2019 16:39:38 +0000 (16:39 +0000)
commit6d1e98dfd2bfce30640d71df355bedf114229744
tree4fd650f51b146fd95f2345a09063f202a8768f53
parent7c3958812bd5e2e139c7f0adf8f03b505fda67f2
Make ira call df_set_regs_ever_live for extra call-clobbered regs

If we support multiple ABIs in the same translation unit, it can
sometimes be the case that a callee clobbers more registers than
its caller is allowed to.  We need to call df_set_regs_ever_live
on these extra registers so that the prologue and epilogue code
can handle them appropriately.

This patch does that in IRA.  I wanted to avoid another full
instruction walk just for this, so I combined it with the existing
set_paradoxical_subreg walk.  This happens before the first
calculation of elimination offsets.

2019-09-30  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* function-abi.h (function_abi_aggregator): New class.
* function-abi.cc (function_abi_aggregator::caller_save_regs): New
function.
* ira.c (update_equiv_regs_prescan): New function.  Call
set_paradoxical_subreg here rather than...
(update_equiv_regs): ...here.
(ira): Call update_equiv_regs_prescan.

From-SVN: r276339
gcc/ChangeLog
gcc/function-abi.cc
gcc/function-abi.h
gcc/ira.c