diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2014-08-28 06:23:55 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2014-08-28 06:23:55 +0000 |
commit | f2d3f3471e71233bfd0ed8ca6ae463ebf5dbfd8b (patch) | |
tree | a8d474acdda14d86377ba8cb31632e4eed33e603 /gcc | |
parent | cf55cb6a1957b8ab4d2b73d372c36a262d5b09a9 (diff) | |
download | gcc-f2d3f3471e71233bfd0ed8ca6ae463ebf5dbfd8b.zip gcc-f2d3f3471e71233bfd0ed8ca6ae463ebf5dbfd8b.tar.gz gcc-f2d3f3471e71233bfd0ed8ca6ae463ebf5dbfd8b.tar.bz2 |
lower-subreg.c (adjust_decomposed_uses): Delete.
gcc/
* lower-subreg.c (adjust_decomposed_uses): Delete.
(resolve_debug): Use FOR_EACH_SUBRTX_PTR rather than for_each_rtx.
Remove handling of null rtxes.
From-SVN: r214648
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/lower-subreg.c | 47 |
2 files changed, 24 insertions, 29 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e8c89a4..a717bb9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2014-08-28 Richard Sandiford <rdsandiford@googlemail.com> + * lower-subreg.c (adjust_decomposed_uses): Delete. + (resolve_debug): Use FOR_EACH_SUBRTX_PTR rather than for_each_rtx. + Remove handling of null rtxes. + +2014-08-28 Richard Sandiford <rdsandiford@googlemail.com> + * lower-subreg.c: Include rtl-iter.h. (resolve_subreg_use): Turn from being a for_each_rtx callback to being a function that examines each subrtx itself. Remove diff --git a/gcc/lower-subreg.c b/gcc/lower-subreg.c index 43991e6..b5b4566 100644 --- a/gcc/lower-subreg.c +++ b/gcc/lower-subreg.c @@ -765,34 +765,6 @@ resolve_subreg_use (rtx *loc, rtx insn) return false; } -/* This is called via for_each_rtx. Look for SUBREGs which can be - decomposed and decomposed REGs that need copying. */ - -static int -adjust_decomposed_uses (rtx *px, void *data ATTRIBUTE_UNUSED) -{ - rtx x = *px; - - if (x == NULL_RTX) - return 0; - - if (resolve_subreg_p (x)) - { - x = simplify_subreg_concatn (GET_MODE (x), SUBREG_REG (x), - SUBREG_BYTE (x)); - - if (x) - *px = x; - else - x = copy_rtx (*px); - } - - if (resolve_reg_p (x)) - *px = copy_rtx (x); - - return 0; -} - /* Resolve any decomposed registers which appear in register notes on INSN. */ @@ -1167,7 +1139,24 @@ resolve_use (rtx pat, rtx_insn *insn) static void resolve_debug (rtx_insn *insn) { - for_each_rtx (&PATTERN (insn), adjust_decomposed_uses, NULL_RTX); + subrtx_ptr_iterator::array_type array; + FOR_EACH_SUBRTX_PTR (iter, array, &PATTERN (insn), NONCONST) + { + rtx *loc = *iter; + rtx x = *loc; + if (resolve_subreg_p (x)) + { + x = simplify_subreg_concatn (GET_MODE (x), SUBREG_REG (x), + SUBREG_BYTE (x)); + + if (x) + *loc = x; + else + x = copy_rtx (*loc); + } + if (resolve_reg_p (x)) + *loc = copy_rtx (x); + } df_insn_rescan (insn); |