summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-exegesis/lib/Target.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/llvm-exegesis/lib/Target.h')
-rw-r--r--llvm/tools/llvm-exegesis/lib/Target.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/llvm/tools/llvm-exegesis/lib/Target.h b/llvm/tools/llvm-exegesis/lib/Target.h
index 0c574780865..4b0c9d17dd7 100644
--- a/llvm/tools/llvm-exegesis/lib/Target.h
+++ b/llvm/tools/llvm-exegesis/lib/Target.h
@@ -85,11 +85,22 @@ public:
// Fills memory operands with references to the address at [Reg] + Offset.
virtual void fillMemoryOperands(InstructionTemplate &IT, unsigned Reg,
unsigned Offset) const {
-
llvm_unreachable(
"fillMemoryOperands() requires getScratchMemoryRegister() > 0");
}
+ // Returns a counter usable as a loop counter.
+ virtual unsigned getLoopCounterRegister(const llvm::Triple &) const {
+ return 0;
+ }
+
+ // Adds the code to decrement the loop counter and
+ virtual void decrementLoopCounterAndLoop(MachineBasicBlock &MBB,
+ const llvm::MCInstrInfo &MII) const {
+ llvm_unreachable("decrementLoopCounterAndBranch() requires "
+ "getLoopCounterRegister() > 0");
+ }
+
// Returns a list of unavailable registers.
// Targets can use this to prevent some registers to be automatically selected
// for use in snippets.
OpenPOWER on IntegriCloud