aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc/md.texi
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2013-11-09 11:42:16 +0000
committerRichard Sandiford <rdsandiford@googlemail.com>2013-11-09 11:42:16 +0000
commit94b3f7c0e01eac828463735451ae32d951161f55 (patch)
tree5b96e2c7a588193d1b4019f9316a1ca13b8376ce /gcc/doc/md.texi
parent553f4ea856ffc43fa7de7cb5aacb52cbc020957a (diff)
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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@204614 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/doc/md.texi')
-rw-r--r--gcc/doc/md.texi31
1 files changed, 12 insertions, 19 deletions
diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi
index 1e22b88f608..1a06e3d6e74 100644
--- a/gcc/doc/md.texi
+++ b/gcc/doc/md.texi
@@ -5857,34 +5857,27 @@ reduction is enabled.
@cindex @code{doloop_end} instruction pattern
@item @samp{doloop_end}
-Conditional branch instruction that decrements a register and jumps if
-the register is nonzero. This instruction takes five operands: Operand
-0 is the register to decrement and test; operand 1 is the number of loop
-iterations as a @code{const_int} or @code{const0_rtx} if this cannot be
-determined until run-time; operand 2 is the actual or estimated maximum
-number of iterations as a @code{const_int}; operand 3 is the number of
-enclosed loops as a @code{const_int} (an innermost loop has a value of
-1); operand 4 is the label to jump to if the register is nonzero;
-operand 5 is const1_rtx if the loop in entered at its top, const0_rtx
-otherwise.
+Conditional branch instruction that decrements a register and
+jumps if the register is nonzero. Operand 0 is the register to
+decrement and test; operand 1 is the label to jump to if the
+register is nonzero.
@xref{Looping Patterns}.
This optional instruction pattern should be defined for machines with
low-overhead looping instructions as the loop optimizer will try to
-modify suitable loops to utilize it. If nested low-overhead looping is
-not supported, use a @code{define_expand} (@pxref{Expander Definitions})
-and make the pattern fail if operand 3 is not @code{const1_rtx}.
-Similarly, if the actual or estimated maximum number of iterations is
-too large for this instruction, make it fail.
+modify suitable loops to utilize it. The target hook
+@code{TARGET_CAN_USE_DOLOOP_P} controls the conditions under which
+low-overhead loops can be used.
@cindex @code{doloop_begin} instruction pattern
@item @samp{doloop_begin}
Companion instruction to @code{doloop_end} required for machines that
-need to perform some initialization, such as loading special registers
-used by a low-overhead looping instruction. If initialization insns do
-not always need to be emitted, use a @code{define_expand}
-(@pxref{Expander Definitions}) and make it fail.
+need to perform some initialization, such as loading a special counter
+register. Operand 1 is the associated @code{doloop_end} pattern and
+operand 0 is the register that it decrements.
+If initialization insns do not always need to be emitted, use a
+@code{define_expand} (@pxref{Expander Definitions}) and make it fail.
@cindex @code{canonicalize_funcptr_for_compare} instruction pattern
@item @samp{canonicalize_funcptr_for_compare}