summaryrefslogtreecommitdiff
path: root/include/llvm/Target
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2013-09-06 17:32:34 +0000
committerAndrew Trick <atrick@apple.com>2013-09-06 17:32:34 +0000
commit38e61122f27a8ca4ef0578eaf6dc5242880d2918 (patch)
treecd143efdeeeab78bbea3b09a1c70310a8701f74d /include/llvm/Target
parent1bcff6cffa30c2fdcf0eac80ef9551429b38f25d (diff)
downloadllvm-38e61122f27a8ca4ef0578eaf6dc5242880d2918.tar.gz
llvm-38e61122f27a8ca4ef0578eaf6dc5242880d2918.tar.bz2
llvm-38e61122f27a8ca4ef0578eaf6dc5242880d2918.tar.xz
Added MachineSchedPolicy.
Allow subtargets to customize the generic scheduling strategy. This is convenient for targets that don't need to add new heuristics by specializing the strategy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190176 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target')
-rw-r--r--include/llvm/Target/TargetSubtargetInfo.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/llvm/Target/TargetSubtargetInfo.h b/include/llvm/Target/TargetSubtargetInfo.h
index 2092aba8a2..37365b2a9c 100644
--- a/include/llvm/Target/TargetSubtargetInfo.h
+++ b/include/llvm/Target/TargetSubtargetInfo.h
@@ -25,6 +25,7 @@ class SDep;
class SUnit;
class TargetRegisterClass;
class TargetSchedModel;
+struct MachineSchedPolicy;
template <typename T> class SmallVectorImpl;
//===----------------------------------------------------------------------===//
@@ -62,6 +63,16 @@ public:
/// scheduler. It does not yet disable the postRA scheduler.
virtual bool enableMachineScheduler() const;
+ /// \brief Override generic scheduling policy within a region.
+ ///
+ /// This is a convenient way for targets that don't provide any custom
+ /// scheduling heuristics (no custom MachineSchedStrategy) to make
+ /// changes to the generic scheduling policy.
+ virtual void overrideSchedPolicy(MachineSchedPolicy &Policy,
+ MachineInstr *begin,
+ MachineInstr *end,
+ unsigned NumRegionInstrs) const {}
+
// enablePostRAScheduler - If the target can benefit from post-regalloc
// scheduling and the specified optimization level meets the requirement
// return true to enable post-register-allocation scheduling. In