From: Richard Sandiford Date: Thu, 28 Aug 2014 06:23:55 +0000 (+0000) Subject: lower-subreg.c (adjust_decomposed_uses): Delete. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f2d3f3471e71233bfd0ed8ca6ae463ebf5dbfd8b;p=gcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e8c89a4207d..a717bb9acfd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2014-08-28 Richard Sandiford + + * 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 * lower-subreg.c: Include rtl-iter.h. diff --git a/gcc/lower-subreg.c b/gcc/lower-subreg.c index 43991e6281a..b5b45664940 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);