From: Kyrylo Tkachov Date: Mon, 13 Feb 2017 15:54:50 +0000 (+0000) Subject: [AArch64] Use contains_mem_rtx_p to detect memory sub-rtxes X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=550e2205cc42e5ca9906c81cbe4c3c4bc285fd5e;p=gcc.git [AArch64] Use contains_mem_rtx_p to detect memory sub-rtxes * config/aarch64/aarch64.c (has_memory_op): Delete. (aarch64_madd_needs_nop): Use contains_mem_rtx_p instead of has_memory_op. From-SVN: r245391 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 814b7845f6f..098b1e61247 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-02-13 Kyrylo Tkachov + + * config/aarch64/aarch64.c (has_memory_op): Delete. + (aarch64_madd_needs_nop): Use contains_mem_rtx_p instead of + has_memory_op. + 2017-02-13 Jakub Jelinek PR rtl-optimization/79388 @@ -6,7 +12,7 @@ corresponding dest has last value recorded, invalidate that last value. -2016-02-13 Kyrylo Tkachov +2017-02-13 Kyrylo Tkachov * config/arm/arm.c (arm_print_tune_info): Use ASM_COMMENT_START instead of explicit '@'. Add missing assembly comment marker on branch costs diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index ebd17a4a1a3..4be3131275c 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -10912,21 +10912,6 @@ aarch64_mangle_type (const_tree type) return NULL; } - -/* Return true if the rtx_insn contains a MEM RTX somewhere - in it. */ - -static bool -has_memory_op (rtx_insn *mem_insn) -{ - subrtx_iterator::array_type array; - FOR_EACH_SUBRTX (iter, array, PATTERN (mem_insn), ALL) - if (MEM_P (*iter)) - return true; - - return false; -} - /* Find the first rtx_insn before insn that will generate an assembly instruction. */ @@ -11019,7 +11004,7 @@ aarch64_madd_needs_nop (rtx_insn* insn) Restore recog state to INSN to avoid state corruption. */ extract_constrain_insn_cached (insn); - if (!prev || !has_memory_op (prev)) + if (!prev || !contains_mem_rtx_p (PATTERN (prev))) return false; body = single_set (prev);