diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2014-08-28 06:24:12 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2014-08-28 06:24:12 +0000 |
commit | 0d2e76b87c7879bca917cae23f4a95103f105184 (patch) | |
tree | 5fb457f5700329cb63cfb9af4ce3f014c0577bf0 | |
parent | 4ca738b329b3afee1f0f68cb0f3540db79b5a4ac (diff) | |
download | gcc-0d2e76b87c7879bca917cae23f4a95103f105184.zip gcc-0d2e76b87c7879bca917cae23f4a95103f105184.tar.gz gcc-0d2e76b87c7879bca917cae23f4a95103f105184.tar.bz2 |
regcprop.c (cprop_find_used_regs_1): Delete.
gcc/
* regcprop.c (cprop_find_used_regs_1): Delete.
(cprop_find_used_regs): Use FOR_EACH_SUBRTX instead of for_each_rtx.
From-SVN: r214652
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/regcprop.c | 37 |
2 files changed, 21 insertions, 21 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5deaac3..45ec00b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2014-08-28 Richard Sandiford <rdsandiford@googlemail.com> + * regcprop.c (cprop_find_used_regs_1): Delete. + (cprop_find_used_regs): Use FOR_EACH_SUBRTX instead of for_each_rtx. + +2014-08-28 Richard Sandiford <rdsandiford@googlemail.com> + * regcprop.c: Include rtl-iter.h. (kill_value): Take a const_rtx. (kill_autoinc_value): Turn from being a for_each_rtx callback diff --git a/gcc/regcprop.c b/gcc/regcprop.c index e65f89d..3297721 100644 --- a/gcc/regcprop.c +++ b/gcc/regcprop.c @@ -702,33 +702,28 @@ apply_debug_insn_changes (struct value_data *vd, unsigned int regno) apply_change_group (); } -/* Called via for_each_rtx, for all used registers in a real - insn apply DEBUG_INSN changes that change registers to the - used register. */ - -static int -cprop_find_used_regs_1 (rtx *loc, void *data) -{ - if (REG_P (*loc)) - { - struct value_data *vd = (struct value_data *) data; - if (vd->e[REGNO (*loc)].debug_insn_changes) - { - apply_debug_insn_changes (vd, REGNO (*loc)); - free_debug_insn_changes (vd, REGNO (*loc)); - } - } - return 0; -} - /* Called via note_uses, for all used registers in a real insn apply DEBUG_INSN changes that change registers to the used registers. */ static void -cprop_find_used_regs (rtx *loc, void *vd) +cprop_find_used_regs (rtx *loc, void *data) { - for_each_rtx (loc, cprop_find_used_regs_1, vd); + struct value_data *const vd = (struct value_data *) data; + subrtx_iterator::array_type array; + FOR_EACH_SUBRTX (iter, array, *loc, NONCONST) + { + const_rtx x = *iter; + if (REG_P (x)) + { + unsigned int regno = REGNO (x); + if (vd->e[regno].debug_insn_changes) + { + apply_debug_insn_changes (vd, regno); + free_debug_insn_changes (vd, regno); + } + } + } } /* Perform the forward copy propagation on basic block BB. */ |