diff options
| author | Clement Courbet <courbet@google.com> | 2018-11-08 11:45:14 +0000 |
|---|---|---|
| committer | Clement Courbet <courbet@google.com> | 2018-11-08 11:45:14 +0000 |
| commit | c0950ae99090d13515328eb2f6714fe0e86c28b0 (patch) | |
| tree | 0f5ff0d4c85b6d5379eb1e72d61b6673c229b7c9 /llvm/tools/llvm-exegesis/lib/Target.h | |
| parent | 797004d2ea98342aa9a5e6d458f44a4e2e8f18cd (diff) | |
| download | bcm5719-llvm-c0950ae99090d13515328eb2f6714fe0e86c28b0.tar.gz bcm5719-llvm-c0950ae99090d13515328eb2f6714fe0e86c28b0.zip | |
[llvm-exegesis] Add a snippet generator to generate snippets to compute ROB sizes.
llvm-svn: 346394
Diffstat (limited to 'llvm/tools/llvm-exegesis/lib/Target.h')
| -rw-r--r-- | llvm/tools/llvm-exegesis/lib/Target.h | 13 |
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 b0f0e996173..c4be621b291 100644 --- a/llvm/tools/llvm-exegesis/lib/Target.h +++ b/llvm/tools/llvm-exegesis/lib/Target.h @@ -76,6 +76,11 @@ public: setRegTo(const llvm::MCSubtargetInfo &STI, unsigned Reg, const llvm::APInt &Value) const = 0; + // Generates code to copy `FromReg` to `ToReg`. + // Precondition: Registers must be the same size. + virtual std::vector<llvm::MCInst> + copyReg(const llvm::MCSubtargetInfo &STI, unsigned ToReg, unsigned FromReg) const = 0; + // Returns the register pointing to scratch memory, or 0 if this target // does not support memory operands. The benchmark function uses the // default calling convention. @@ -83,10 +88,16 @@ public: return 0; } + // Returns the opcode to move the value at `[Reg]` into `Reg`, where `Reg` is + // the from the same register class as getScratchMemoryRegister(). + virtual unsigned getChaseRegOpcode() const { + llvm_unreachable( + "fillMemoryOperands() requires getScratchMemoryRegister() > 0"); + } + // 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"); } |

