emit-rtl.c: Include rtl-iter.h.
gcc/ * emit-rtl.c: Include rtl-iter.h. (find_auto_inc): Turn from being a for_each_rtx callback to being a function that examines each subrtx itself. Assume the first operand to an RTX_AUTOINC is the automodified register. (try_split): Update call accordingly. From-SVN: r214638
This commit is contained in:
parent
3e971a9125
commit
9021b8ec96
|
@ -1,3 +1,11 @@
|
||||||
|
2014-08-28 Richard Sandiford <rdsandiford@googlemail.com>
|
||||||
|
|
||||||
|
* emit-rtl.c: Include rtl-iter.h.
|
||||||
|
(find_auto_inc): Turn from being a for_each_rtx callback to being
|
||||||
|
a function that examines each subrtx itself. Assume the first operand
|
||||||
|
to an RTX_AUTOINC is the automodified register.
|
||||||
|
(try_split): Update call accordingly.
|
||||||
|
|
||||||
2014-08-28 Richard Sandiford <rdsandiford@googlemail.com>
|
2014-08-28 Richard Sandiford <rdsandiford@googlemail.com>
|
||||||
|
|
||||||
* dwarf2out.c (resolve_one_addr): Remove unused data parameter.
|
* dwarf2out.c (resolve_one_addr): Remove unused data parameter.
|
||||||
|
|
|
@ -58,6 +58,7 @@ along with GCC; see the file COPYING3. If not see
|
||||||
#include "params.h"
|
#include "params.h"
|
||||||
#include "target.h"
|
#include "target.h"
|
||||||
#include "builtins.h"
|
#include "builtins.h"
|
||||||
|
#include "rtl-iter.h"
|
||||||
|
|
||||||
struct target_rtl default_target_rtl;
|
struct target_rtl default_target_rtl;
|
||||||
#if SWITCHABLE_TARGET
|
#if SWITCHABLE_TARGET
|
||||||
|
@ -3505,30 +3506,17 @@ prev_cc0_setter (rtx insn)
|
||||||
/* Find a RTX_AUTOINC class rtx which matches DATA. */
|
/* Find a RTX_AUTOINC class rtx which matches DATA. */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
find_auto_inc (rtx *xp, void *data)
|
find_auto_inc (const_rtx x, const_rtx reg)
|
||||||
{
|
{
|
||||||
rtx x = *xp;
|
subrtx_iterator::array_type array;
|
||||||
rtx reg = (rtx) data;
|
FOR_EACH_SUBRTX (iter, array, x, NONCONST)
|
||||||
|
|
||||||
if (GET_RTX_CLASS (GET_CODE (x)) != RTX_AUTOINC)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
switch (GET_CODE (x))
|
|
||||||
{
|
{
|
||||||
case PRE_DEC:
|
const_rtx x = *iter;
|
||||||
case PRE_INC:
|
if (GET_RTX_CLASS (GET_CODE (x)) == RTX_AUTOINC
|
||||||
case POST_DEC:
|
&& rtx_equal_p (reg, XEXP (x, 0)))
|
||||||
case POST_INC:
|
return true;
|
||||||
case PRE_MODIFY:
|
|
||||||
case POST_MODIFY:
|
|
||||||
if (rtx_equal_p (reg, XEXP (x, 0)))
|
|
||||||
return 1;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
gcc_unreachable ();
|
|
||||||
}
|
}
|
||||||
return -1;
|
return false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -3715,7 +3703,7 @@ try_split (rtx pat, rtx trial, int last)
|
||||||
{
|
{
|
||||||
rtx reg = XEXP (note, 0);
|
rtx reg = XEXP (note, 0);
|
||||||
if (!FIND_REG_INC_NOTE (insn, reg)
|
if (!FIND_REG_INC_NOTE (insn, reg)
|
||||||
&& for_each_rtx (&PATTERN (insn), find_auto_inc, reg) > 0)
|
&& find_auto_inc (PATTERN (insn), reg))
|
||||||
add_reg_note (insn, REG_INC, reg);
|
add_reg_note (insn, REG_INC, reg);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue