diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2013-11-09 11:42:16 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2013-11-09 11:42:16 +0000 |
commit | 1d0216c8b79931cffcc5599b8a9a4f6eaf86d2b7 (patch) | |
tree | 5b96e2c7a588193d1b4019f9316a1ca13b8376ce /gcc/config/mep | |
parent | 12929715b124071e523316c28897c8a05083cf12 (diff) | |
download | gcc-1d0216c8b79931cffcc5599b8a9a4f6eaf86d2b7.zip gcc-1d0216c8b79931cffcc5599b8a9a4f6eaf86d2b7.tar.gz gcc-1d0216c8b79931cffcc5599b8a9a4f6eaf86d2b7.tar.bz2 |
target.def (can_use_doloop_p): New hook.
gcc/
* target.def (can_use_doloop_p): New hook.
* doc/tm.texi.in (TARGET_CAN_USE_DOLOOP_P): Add.
* doc/tm.texi: Regenerate.
* doc/md.texi (doloop_begin, doloop_end): Update documentation.
* hooks.h (hook_bool_dint_dint_uint_true): Declare.
* hooks.c (hook_bool_dint_dint_uint_true): New function.
* targhooks.h (can_use_doloop_if_innermost): Declare.
* targhooks.c (can_use_doloop_if_innermost): New function.
* target.h: Include double-int.h.
* loop-doloop.c (doloop_optimize): Call targetm.can_use_doloop_p.
Remove iteration count, maximum iteration count, loop depth and
enter-at-top inputs from doloop_begin and doloop_end.
* config/arc/arc.md (doloop_begin, doloop_end): Update for new
interface.
* config/arc/arc.c (arc_can_use_doloop_p): New function.
(TARGET_CAN_USE_DOLOOP_P): Define.
* config/arm/thumb2.md (doloop_end): Update for new interface.
* config/arm/arm.c (TARGET_CAN_USE_DOLOOP_P): Define.
* config/bfin/bfin.md (doloop_end): Update for new interface.
* config/bfin/bfin.c (bfin_can_use_doloop_p): New function.
(TARGET_CAN_USE_DOLOOP_P): Define.
* config/c6x/c6x.md (doloop_end): Update for new interface.
* config/ia64/ia64.md (doloop_end): Update for new interface.
* config/ia64/ia64.c (TARGET_CAN_USE_DOLOOP_P): Define.
* config/mep/mep.md (doloop_begin, doloop_end): Update for new
interface.
* config/mep/mep.c (mep_emit_doloop): Likewise.
(TARGET_CAN_USE_DOLOOP_P): Define.
* config/rs6000/rs6000.md (doloop_end): Update for new interface.
* config/rs6000/rs6000.c (TARGET_CAN_USE_DOLOOP_P): Define.
* config/s390/s390.md (doloop_end): Update for new interface.
* config/sh/sh.md (doloop_end): Likewise.
* config/spu/spu.md (doloop_end): Likewise.
* config/spu/spu.c (TARGET_CAN_USE_DOLOOP_P): Define.
* config/tilegx/tilegx.md (doloop_end): Update for new interface.
* config/tilegx/tilegx.c (TARGET_CAN_USE_DOLOOP_P): Define.
* config/tilepro/tilepro.md (doloop_end): Update for new interface.
* config/tilepro/tilepro.c (TARGET_CAN_USE_DOLOOP_P): Define.
* config/v850/v850.md (doloop_begin, doloop_end): Update for new
interface.
* config/v850/v850.c (TARGET_CAN_USE_DOLOOP_P): Define.
From-SVN: r204614
Diffstat (limited to 'gcc/config/mep')
-rw-r--r-- | gcc/config/mep/mep.c | 4 | ||||
-rw-r--r-- | gcc/config/mep/mep.md | 19 |
2 files changed, 7 insertions, 16 deletions
diff --git a/gcc/config/mep/mep.c b/gcc/config/mep/mep.c index d082070..e67540a 100644 --- a/gcc/config/mep/mep.c +++ b/gcc/config/mep/mep.c @@ -5103,7 +5103,7 @@ mep_emit_doloop (rtx *operands, int is_end) tag = GEN_INT (cfun->machine->doloop_tags - 1); if (is_end) - emit_jump_insn (gen_doloop_end_internal (operands[0], operands[4], tag)); + emit_jump_insn (gen_doloop_end_internal (operands[0], operands[1], tag)); else emit_insn (gen_doloop_begin_internal (operands[0], operands[0], tag)); } @@ -7280,6 +7280,8 @@ mep_asm_init_sections (void) #define TARGET_TRAMPOLINE_INIT mep_trampoline_init #undef TARGET_LEGITIMATE_CONSTANT_P #define TARGET_LEGITIMATE_CONSTANT_P mep_legitimate_constant_p +#undef TARGET_CAN_USE_DOLOOP_P +#define TARGET_CAN_USE_DOLOOP_P can_use_doloop_if_innermost struct gcc_target targetm = TARGET_INITIALIZER; diff --git a/gcc/config/mep/mep.md b/gcc/config/mep/mep.md index 3f09a23..42542ea 100644 --- a/gcc/config/mep/mep.md +++ b/gcc/config/mep/mep.md @@ -2076,14 +2076,9 @@ (define_expand "doloop_begin" [(use (match_operand 0 "register_operand" "")) - (use (match_operand:QI 1 "const_int_operand" "")) - (use (match_operand:QI 2 "const_int_operand" "")) - (use (match_operand:QI 3 "const_int_operand" "")) - (use (match_operand 4 "" ""))] + (use (match_operand 1 "" ""))] "!profile_arc_flag && TARGET_OPT_REPEAT" - "if (INTVAL (operands[3]) > 1) - FAIL; - mep_emit_doloop (operands, 0); + "mep_emit_doloop (operands, 0); DONE; ") @@ -2112,15 +2107,9 @@ (define_expand "doloop_end" [(use (match_operand 0 "nonimmediate_operand" "")) - (use (match_operand:QI 1 "const_int_operand" "")) - (use (match_operand:QI 2 "const_int_operand" "")) - (use (match_operand:QI 3 "const_int_operand" "")) - (use (label_ref (match_operand 4 "" ""))) - (use (match_operand 5 "" ""))] + (use (label_ref (match_operand 1 "" "")))] "!profile_arc_flag && TARGET_OPT_REPEAT" - "if (INTVAL (operands[3]) > 1) - FAIL; - if (GET_CODE (operands[0]) == REG && GET_MODE (operands[0]) != SImode) + "if (GET_CODE (operands[0]) == REG && GET_MODE (operands[0]) != SImode) FAIL; mep_emit_doloop (operands, 1); DONE; |