diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2014-08-28 06:21:44 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2014-08-28 06:21:44 +0000 |
commit | 403837b4cb714be6d248daa44a369b3a8bf7607a (patch) | |
tree | 019ac44a843b533ab2e542ac3eb677683379fc3e /gcc/alias.c | |
parent | 476dd0ce18abee7581ab669bb9d5b80dcac09d82 (diff) | |
download | gcc-403837b4cb714be6d248daa44a369b3a8bf7607a.zip gcc-403837b4cb714be6d248daa44a369b3a8bf7607a.tar.gz gcc-403837b4cb714be6d248daa44a369b3a8bf7607a.tar.bz2 |
alias.c: Include rtl-iter.h.
gcc/
* alias.c: Include rtl-iter.h.
(refs_newer_value_cb): Delete.
(refs_newer_value_p): Use FOR_EACH_SUBRTX instead of for_each_rtx.
From-SVN: r214619
Diffstat (limited to 'gcc/alias.c')
-rw-r--r-- | gcc/alias.c | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/gcc/alias.c b/gcc/alias.c index 2debddb..602e9e0 100644 --- a/gcc/alias.c +++ b/gcc/alias.c @@ -47,6 +47,7 @@ along with GCC; see the file COPYING3. If not see #include "is-a.h" #include "gimple.h" #include "gimple-ssa.h" +#include "rtl-iter.h" /* The aliasing API provided here solves related but different problems: @@ -1851,27 +1852,18 @@ base_alias_check (rtx x, rtx x_base, rtx y, rtx y_base, return 1; } -/* Callback for for_each_rtx, that returns 1 upon encountering a VALUE - whose UID is greater than the int uid that D points to. */ - -static int -refs_newer_value_cb (rtx *x, void *d) -{ - if (GET_CODE (*x) == VALUE && CSELIB_VAL_PTR (*x)->uid > *(int *)d) - return 1; - - return 0; -} - /* Return TRUE if EXPR refers to a VALUE whose uid is greater than that of V. */ static bool -refs_newer_value_p (rtx expr, rtx v) +refs_newer_value_p (const_rtx expr, rtx v) { int minuid = CSELIB_VAL_PTR (v)->uid; - - return for_each_rtx (&expr, refs_newer_value_cb, &minuid); + subrtx_iterator::array_type array; + FOR_EACH_SUBRTX (iter, array, expr, NONCONST) + if (GET_CODE (*iter) == VALUE && CSELIB_VAL_PTR (*iter)->uid > minuid) + return true; + return false; } /* Convert the address X into something we can use. This is done by returning |