From 35b81ea3f7412360d6f108c5b9b7a8a1b9f3b138 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Mon, 30 Sep 2019 16:21:10 +0000 Subject: [PATCH] Remove global call sets: recog.c 2019-09-30 Richard Sandiford gcc/ * recog.c: Include function-abi.h. (peep2_find_free_register): Use crtl->abi when deciding whether a register is free for use after RA. From-SVN: r276330 --- gcc/ChangeLog | 6 ++++++ gcc/recog.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a30c38d..24f73f8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2019-09-30 Richard Sandiford + * recog.c: Include function-abi.h. + (peep2_find_free_register): Use crtl->abi when deciding whether + a register is free for use after RA. + +2019-09-30 Richard Sandiford + * postreload-gcse.c: Include regs.h and function-abi.h. (record_opr_changes): Use insn_callee_abi to get the ABI of the call insn target. Conservatively assume that partially-clobbered diff --git a/gcc/recog.c b/gcc/recog.c index f3e8a4c..aa31ffa 100644 --- a/gcc/recog.c +++ b/gcc/recog.c @@ -40,6 +40,7 @@ along with GCC; see the file COPYING3. If not see #include "cfgcleanup.h" #include "reload.h" #include "tree-pass.h" +#include "function-abi.h" #ifndef STACK_POP_CODE #if STACK_GROWS_DOWNWARD @@ -3227,7 +3228,7 @@ peep2_find_free_register (int from, int to, const char *class_str, break; } /* And that we don't create an extra save/restore. */ - if (! call_used_or_fixed_reg_p (regno + j) + if (! crtl->abi->clobbers_full_reg_p (regno + j) && ! df_regs_ever_live_p (regno + j)) { success = 0; -- 2.7.4