aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2014-10-27 18:41:17 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2014-10-27 18:41:17 +0000
commitdbb838b7408ba394688c700f2aa360fe299dd89a (patch)
tree7687d51dc7bf525eb88ee9d0f8bfc3e59585da6e
parent4dba3553998e554e7e4775540f9c77c9a3c21246 (diff)
downloadgcc-dbb838b7408ba394688c700f2aa360fe299dd89a.zip
gcc-dbb838b7408ba394688c700f2aa360fe299dd89a.tar.gz
gcc-dbb838b7408ba394688c700f2aa360fe299dd89a.tar.bz2
alpha-protos.h (some_small_symbolic_operand_int): Take an rtx and return a bool.
gcc/ * config/alpha/alpha-protos.h (some_small_symbolic_operand_int): Take an rtx and return a bool. * config/alpha/alpha.c (some_small_symbolic_operand_int): Likewise. Use FOR_EACH_SUBRTX_VAR. * config/alpha/predicates.md (some_small_symbolic_operand): Update accordingly. From-SVN: r216757
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/config/alpha/alpha-protos.h2
-rw-r--r--gcc/config/alpha/alpha.c22
-rw-r--r--gcc/config/alpha/predicates.md2
4 files changed, 24 insertions, 11 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 972ed0a..cc6c8ce 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,14 @@
2014-10-27 Richard Sandiford <richard.sandiford@arm.com>
+ * config/alpha/alpha-protos.h (some_small_symbolic_operand_int):
+ Take an rtx and return a bool.
+ * config/alpha/alpha.c (some_small_symbolic_operand_int): Likewise.
+ Use FOR_EACH_SUBRTX_VAR.
+ * config/alpha/predicates.md (some_small_symbolic_operand): Update
+ accordingly.
+
+2014-10-27 Richard Sandiford <richard.sandiford@arm.com>
+
* config/alpha/alpha-protos.h (alpha_find_lo_sum_using_gp): Return
a bool.
* config/alpha/alpha.c (find_lo_sum_using_gp): Delete.
diff --git a/gcc/config/alpha/alpha-protos.h b/gcc/config/alpha/alpha-protos.h
index 22c082d..304a668 100644
--- a/gcc/config/alpha/alpha-protos.h
+++ b/gcc/config/alpha/alpha-protos.h
@@ -112,6 +112,6 @@ extern HOST_WIDE_INT alpha_vms_initial_elimination_offset (unsigned int,
extern rtx unicosmk_add_call_info_word (rtx);
-extern int some_small_symbolic_operand_int (rtx *, void *);
+extern bool some_small_symbolic_operand_int (rtx);
extern int tls_symbolic_operand_1 (rtx, int, int);
extern rtx resolve_reload_operand (rtx);
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index 966999c..ba8b249 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -1233,16 +1233,20 @@ alpha_function_ok_for_sibcall (tree decl, tree exp ATTRIBUTE_UNUSED)
return decl_has_samegp (decl);
}
-int
-some_small_symbolic_operand_int (rtx *px, void *data ATTRIBUTE_UNUSED)
+bool
+some_small_symbolic_operand_int (rtx x)
{
- rtx x = *px;
-
- /* Don't re-split. */
- if (GET_CODE (x) == LO_SUM)
- return -1;
-
- return small_symbolic_operand (x, Pmode) != 0;
+ subrtx_var_iterator::array_type array;
+ FOR_EACH_SUBRTX_VAR (iter, array, x, ALL)
+ {
+ rtx x = *iter;
+ /* Don't re-split. */
+ if (GET_CODE (x) == LO_SUM)
+ iter.skip_subrtxes ();
+ else if (small_symbolic_operand (x, Pmode))
+ return true;
+ }
+ return false;
}
rtx
diff --git a/gcc/config/alpha/predicates.md b/gcc/config/alpha/predicates.md
index c68e83a..9cf7452 100644
--- a/gcc/config/alpha/predicates.md
+++ b/gcc/config/alpha/predicates.md
@@ -638,7 +638,7 @@
/* Avoid search unless necessary. */
if (!TARGET_EXPLICIT_RELOCS || !reload_completed)
return false;
- return for_each_rtx (&op, some_small_symbolic_operand_int, NULL);
+ return some_small_symbolic_operand_int (op);
})
;; Accept a register, or a memory if BWX is enabled.