+2014-08-28 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * ddg.c: Include rtl-iter.h.
+ (mark_mem_use_1): Rename to...
+ (mark_mem_use): ...deleting old mark_mem_use. Use FOR_EACH_SUBRTX
+ instead of for_each_rtx.
+ (mem_read_insn_p): Update accordingly.
+
2014-08-28 Richard Sandiford <rdsandiford@googlemail.com>
* cse.c (change_cc_mode_args): Delete.
#include "expr.h"
#include "bitmap.h"
#include "ddg.h"
+#include "rtl-iter.h"
#ifdef INSN_SCHEDULING
/* Auxiliary variable for mem_read_insn_p/mem_write_insn_p. */
static bool mem_ref_p;
-/* Auxiliary function for mem_read_insn_p. */
-static int
-mark_mem_use (rtx *x, void *data ATTRIBUTE_UNUSED)
-{
- if (MEM_P (*x))
- mem_ref_p = true;
- return 0;
-}
-
/* Auxiliary function for mem_read_insn_p. */
static void
-mark_mem_use_1 (rtx *x, void *data)
+mark_mem_use (rtx *x, void *)
{
- for_each_rtx (x, mark_mem_use, data);
+ subrtx_iterator::array_type array;
+ FOR_EACH_SUBRTX (iter, array, *x, NONCONST)
+ if (MEM_P (*x))
+ {
+ mem_ref_p = true;
+ break;
+ }
}
/* Returns nonzero if INSN reads from memory. */
mem_read_insn_p (rtx_insn *insn)
{
mem_ref_p = false;
- note_uses (&PATTERN (insn), mark_mem_use_1, NULL);
+ note_uses (&PATTERN (insn), mark_mem_use, NULL);
return mem_ref_p;
}