diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-10-27 18:41:09 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-10-27 18:41:09 +0000 |
commit | fe508bee187f7e4ad5af0cc65801c1f4b34b3e86 (patch) | |
tree | 17288d4c10fb41203b6744be437685d24ac99507 | |
parent | 70b88ec26d265fc38e49c1a27dd4e850a393d16e (diff) | |
download | gcc-fe508bee187f7e4ad5af0cc65801c1f4b34b3e86.tar.gz |
gcc/
* config/alpha/alpha-protos.h (alpha_find_lo_sum_using_gp): Return
a bool.
* config/alpha/alpha.c (find_lo_sum_using_gp): Delete.
(alpha_find_lo_sum_using_gp): Use FOR_EACH_SUBRTX. Return a bool.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216756 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/alpha/alpha-protos.h | 2 | ||||
-rw-r--r-- | gcc/config/alpha/alpha.c | 17 |
3 files changed, 17 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bee2fba7147..972ed0a817e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,12 @@ 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. + (alpha_find_lo_sum_using_gp): Use FOR_EACH_SUBRTX. Return a bool. + +2014-10-27 Richard Sandiford <richard.sandiford@arm.com> + * config/alpha/alpha.c (alpha_set_memflags_1): Delete. (alpha_set_memflags): Use FOR_EACH_SUBRTX_VAR. diff --git a/gcc/config/alpha/alpha-protos.h b/gcc/config/alpha/alpha-protos.h index 753a762a575..22c082d756a 100644 --- a/gcc/config/alpha/alpha-protos.h +++ b/gcc/config/alpha/alpha-protos.h @@ -75,7 +75,7 @@ extern rtx function_value (const_tree, const_tree, enum machine_mode); extern void alpha_start_function (FILE *, const char *, tree); extern void alpha_end_function (FILE *, const char *, tree); -extern int alpha_find_lo_sum_using_gp (rtx); +extern bool alpha_find_lo_sum_using_gp (rtx); #ifdef REAL_VALUE_TYPE extern int check_float_value (enum machine_mode, REAL_VALUE_TYPE *, int); diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c index 09ab4ba16cb..966999c26a9 100644 --- a/gcc/config/alpha/alpha.c +++ b/gcc/config/alpha/alpha.c @@ -7562,16 +7562,17 @@ vms_output_aligned_decl_common(FILE *file, tree decl, const char *name, #endif -static int -find_lo_sum_using_gp (rtx *px, void *data ATTRIBUTE_UNUSED) -{ - return GET_CODE (*px) == LO_SUM && XEXP (*px, 0) == pic_offset_table_rtx; -} - -int +bool alpha_find_lo_sum_using_gp (rtx insn) { - return for_each_rtx (&PATTERN (insn), find_lo_sum_using_gp, NULL) > 0; + subrtx_iterator::array_type array; + FOR_EACH_SUBRTX (iter, array, PATTERN (insn), NONCONST) + { + const_rtx x = *iter; + if (GET_CODE (x) == LO_SUM && XEXP (x, 0) == pic_offset_table_rtx) + return true; + } + return false; } static int |