diff options
Diffstat (limited to 'gcc/doc/tm.texi')
-rw-r--r-- | gcc/doc/tm.texi | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index 2fa6fbd11e2..1645319dff0 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -5668,6 +5668,28 @@ zero. The hook should return @code{NULL} if there are no more nop insns with indexes greater than given index. @end deftypefn +@deftypefn {Target Hook} bool IS_COSTLY_DEPENDENCE (rtx @var{insn1}, rtx @var{insn2}, rtx @var{dep_link}, int @var{dep_cost}, int @var{distance}) +This hook is used to define which dependences are considered costly by +the target, so costly that it is not advisable to schedule the insns that +are involved in the dependence too close to one another. The parameters +to this hook are as follows: The second parameter @var{insn2} is dependent +upon the first parameter @var{insn1}. The dependence between @var{insn1} +and @var{insn2} is represented by the third parameter @var{dep_link}. The +fourth parameter @var{cost} is the cost of the dependence, and the fifth +parameter @var{distance} is the distance in cycles between the two insns. +The hook returns @code{true} if considering the distance between the two +insns the dependence between them is considered costly by the target, +and @code{false} otherwise. + +Defining this hook can be useful in multiple-issue out-of-order machines, +where (a) it's practically hopeless to predict the actual data/resource +delays, however: (b) there's a better chance to predict the actual grouping +that will be formed, and (c) correctly emulating the grouping can be very +important. In such targets one may want to allow issuing dependent insns +closer to one another - i.e, closer than the dependence distance; however, +not in cases of "costly dependences", which this hooks allows to define. +@end deftypefn + Macros in the following table are generated by the program @file{genattr} and can be useful for writing the hooks. |