This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH 9/9] [ARM] Remove artificial doloop_end pattern
- From: zhroma at ispras dot ru
- To: gcc-patches at gcc dot gnu dot org
- Cc: dm at ispras dot ru
- Date: Thu, 21 Jul 2011 20:30:34 +0400
- Subject: [PATCH 9/9] [ARM] Remove artificial doloop_end pattern
- References: <1311265834-2144-1-git-send-email-zhroma@ispras.ru>
This patch eliminates fake doloop_end pattern for ARM platform. The problem
with such a pattern is that it slows down the loop when SMS doesn't create good
schedule. So, i suppose fake pattern is no longer needed with new loop forms
supported.
2011-07-20 Roman Zhuykov <zhroma@ispras.ru>
* config/arm/thumb2.md (doloop_end): Delete.
---
gcc/config/arm/thumb2.md | 51 ----------------------------------------------
1 files changed, 0 insertions(+), 51 deletions(-)
diff --git a/gcc/config/arm/thumb2.md b/gcc/config/arm/thumb2.md
index 9a11012..492e765 100644
--- a/gcc/config/arm/thumb2.md
+++ b/gcc/config/arm/thumb2.md
@@ -1101,54 +1101,3 @@
operands[2] = GEN_INT (32 - INTVAL (operands[2]));
")
-;; Define the subtract-one-and-jump insns so loop.c
-;; knows what to generate.
-(define_expand "doloop_end"
- [(use (match_operand 0 "" "")) ; loop pseudo
- (use (match_operand 1 "" "")) ; iterations; zero if unknown
- (use (match_operand 2 "" "")) ; max iterations
- (use (match_operand 3 "" "")) ; loop level
- (use (match_operand 4 "" ""))] ; label
- "TARGET_32BIT"
- "
- {
- /* Currently SMS relies on the do-loop pattern to recognize loops
- where (1) the control part consists of all insns defining and/or
- using a certain 'count' register and (2) the loop count can be
- adjusted by modifying this register prior to the loop.
- ??? The possible introduction of a new block to initialize the
- new IV can potentially affect branch optimizations. */
- if (optimize > 0 && flag_modulo_sched)
- {
- rtx s0;
- rtx bcomp;
- rtx loc_ref;
- rtx cc_reg;
- rtx insn;
- rtx cmp;
-
- /* Only use this on innermost loops. */
- if (INTVAL (operands[3]) > 1)
- FAIL;
-
- if (GET_MODE (operands[0]) != SImode)
- FAIL;
-
- s0 = operands [0];
- if (TARGET_THUMB2)
- insn = emit_insn (gen_thumb2_addsi3_compare0 (s0, s0, GEN_INT (-1)));
- else
- insn = emit_insn (gen_addsi3_compare0 (s0, s0, GEN_INT (-1)));
-
- cmp = XVECEXP (PATTERN (insn), 0, 0);
- cc_reg = SET_DEST (cmp);
- bcomp = gen_rtx_NE (VOIDmode, cc_reg, const0_rtx);
- loc_ref = gen_rtx_LABEL_REF (VOIDmode, operands [4]);
- emit_jump_insn (gen_rtx_SET (VOIDmode, pc_rtx,
- gen_rtx_IF_THEN_ELSE (VOIDmode, bcomp,
- loc_ref, pc_rtx)));
- DONE;
- }else
- FAIL;
- }")
-
--
Roman Zhuykov
zhroma@ispras.ru