From: Richard Sandiford Date: Sun, 6 Oct 2019 15:39:27 +0000 (+0000) Subject: Fix EXECUTE_IF_SET_IN_HARD_REG_SET use X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1c8264003ab1d6932d874bd1a9af4ac498d4b4a4;p=gcc.git Fix EXECUTE_IF_SET_IN_HARD_REG_SET use As Maxim pointed out, r276309 broke -O3 bootstrap for aarch64-linux-gnu. It turns out that EXECUTE_IF_SET_IN_HARD_REG_SET isn't safe to use for temporary objects because their lifetimes don't extend to the end of the loop. This patch therefore uses an explicit temporary instead. Other patches in the series already used this style (but for full_reg_and_partial_clobbers rather than full_reg_clobbers), so AFAICT this is the only place that needs fixing. 2019-10-06 Richard Sandiford gcc/ * var-tracking.c (dataflow_set_clear_at_call): Hoist temporary function result outside of EXECUTE_IF_SET_IN_HARD_REG_SET. From-SVN: r276639 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a2740d2f386..4b7cb0e5924 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-10-06 Richard Sandiford + + * var-tracking.c (dataflow_set_clear_at_call): Hoist temporary + function result outside of EXECUTE_IF_SET_IN_HARD_REG_SET. + 2019-10-06 Iain Sandoe * config/darwin.c (darwin_override_options): Adjust objective-c diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c index 3d069e41323..5de36ae2f47 100644 --- a/gcc/var-tracking.c +++ b/gcc/var-tracking.c @@ -4902,9 +4902,10 @@ dataflow_set_clear_at_call (dataflow_set *set, rtx_insn *call_insn) unsigned int r; hard_reg_set_iterator hrsi; - function_abi callee_abi = insn_callee_abi (call_insn); + HARD_REG_SET callee_clobbers + = insn_callee_abi (call_insn).full_reg_clobbers (); - EXECUTE_IF_SET_IN_HARD_REG_SET (callee_abi.full_reg_clobbers (), 0, r, hrsi) + EXECUTE_IF_SET_IN_HARD_REG_SET (callee_clobbers, 0, r, hrsi) var_regno_delete (set, r); if (MAY_HAVE_DEBUG_BIND_INSNS)