diff options
Diffstat (limited to 'llvm/tools/llvm-exegesis/lib/MCInstrDescView.h')
-rw-r--r-- | llvm/tools/llvm-exegesis/lib/MCInstrDescView.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/llvm/tools/llvm-exegesis/lib/MCInstrDescView.h b/llvm/tools/llvm-exegesis/lib/MCInstrDescView.h index 893b786762f..c36582ac72d 100644 --- a/llvm/tools/llvm-exegesis/lib/MCInstrDescView.h +++ b/llvm/tools/llvm-exegesis/lib/MCInstrDescView.h @@ -93,12 +93,17 @@ struct InstructionInstance { unsigned getOpcode() const; llvm::MCOperand &getValueFor(const Variable &Var); + const llvm::MCOperand &getValueFor(const Variable &Var) const; llvm::MCOperand &getValueFor(const Operand &Op); + const llvm::MCOperand &getValueFor(const Operand &Op) const; bool hasImmediateVariables() const; - // Assigns a Random Value to all Variables that are still Invalid and returns - // the instance as an llvm::MCInst. - llvm::MCInst randomizeUnsetVariablesAndBuild(); + // Assigns a Random Value to all Variables that are still Invalid. + void randomizeUnsetVariables(); + + // Returns the instance as an llvm::MCInst. The InstructionInstance must be + // fully allocated (no invalid variables). + llvm::MCInst build() const; Instruction Instr; llvm::SmallVector<llvm::MCOperand, 4> VariableValues; |