Commit 40954ce5 by Richard Sandiford Committed by Richard Sandiford

ira.c: Include rtl-iter.h.

gcc/
	* ira.c: Include rtl-iter.h.
	(set_paradoxical_subreg): Turn from being a for_each_rtx callback
	to being a function that examines each subrtx itself.  Remove
	handling of null rtxes.
	(update_equiv_regs): Update call accordingly.

From-SVN: r214642
parent aa4e2d7e
2014-08-28 Richard Sandiford <rdsandiford@googlemail.com> 2014-08-28 Richard Sandiford <rdsandiford@googlemail.com>
* ira.c: Include rtl-iter.h.
(set_paradoxical_subreg): Turn from being a for_each_rtx callback
to being a function that examines each subrtx itself. Remove
handling of null rtxes.
(update_equiv_regs): Update call accordingly.
2014-08-28 Richard Sandiford <rdsandiford@googlemail.com>
* fwprop.c: Include rtl-iter.h. * fwprop.c: Include rtl-iter.h.
(varying_mem_p): Turn from being a for_each_rtx callback to being (varying_mem_p): Turn from being a for_each_rtx callback to being
a function that examines each subrtx itself. a function that examines each subrtx itself.
......
...@@ -392,6 +392,7 @@ along with GCC; see the file COPYING3. If not see ...@@ -392,6 +392,7 @@ along with GCC; see the file COPYING3. If not see
#include "lra.h" #include "lra.h"
#include "dce.h" #include "dce.h"
#include "dbgcnt.h" #include "dbgcnt.h"
#include "rtl-iter.h"
struct target_ira default_target_ira; struct target_ira default_target_ira;
struct target_ira_int default_target_ira_int; struct target_ira_int default_target_ira_int;
...@@ -3266,23 +3267,20 @@ no_equiv (rtx reg, const_rtx store ATTRIBUTE_UNUSED, ...@@ -3266,23 +3267,20 @@ no_equiv (rtx reg, const_rtx store ATTRIBUTE_UNUSED,
/* Check whether the SUBREG is a paradoxical subreg and set the result /* Check whether the SUBREG is a paradoxical subreg and set the result
in PDX_SUBREGS. */ in PDX_SUBREGS. */
static int static void
set_paradoxical_subreg (rtx *subreg, void *pdx_subregs) set_paradoxical_subreg (rtx_insn *insn, bool *pdx_subregs)
{ {
rtx reg; subrtx_iterator::array_type array;
FOR_EACH_SUBRTX (iter, array, PATTERN (insn), NONCONST)
if ((*subreg) == NULL_RTX) {
return 1; const_rtx subreg = *iter;
if (GET_CODE (*subreg) != SUBREG) if (GET_CODE (subreg) == SUBREG)
return 0; {
reg = SUBREG_REG (*subreg); const_rtx reg = SUBREG_REG (subreg);
if (!REG_P (reg)) if (REG_P (reg) && paradoxical_subreg_p (subreg))
return 0; pdx_subregs[REGNO (reg)] = true;
}
if (paradoxical_subreg_p (*subreg)) }
((bool *)pdx_subregs)[REGNO (reg)] = true;
return 0;
} }
/* In DEBUG_INSN location adjust REGs from CLEARED_REGS bitmap to the /* In DEBUG_INSN location adjust REGs from CLEARED_REGS bitmap to the
...@@ -3345,8 +3343,7 @@ update_equiv_regs (void) ...@@ -3345,8 +3343,7 @@ update_equiv_regs (void)
FOR_EACH_BB_FN (bb, cfun) FOR_EACH_BB_FN (bb, cfun)
FOR_BB_INSNS (bb, insn) FOR_BB_INSNS (bb, insn)
if (NONDEBUG_INSN_P (insn)) if (NONDEBUG_INSN_P (insn))
for_each_rtx_in_insn (&insn, set_paradoxical_subreg, set_paradoxical_subreg (insn, pdx_subregs);
(void *) pdx_subregs);
/* Scan the insns and find which registers have equivalences. Do this /* Scan the insns and find which registers have equivalences. Do this
in a separate scan of the insns because (due to -fcse-follow-jumps) in a separate scan of the insns because (due to -fcse-follow-jumps)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment