summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-exegesis/lib/CodeTemplate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/llvm-exegesis/lib/CodeTemplate.cpp')
-rw-r--r--llvm/tools/llvm-exegesis/lib/CodeTemplate.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/llvm/tools/llvm-exegesis/lib/CodeTemplate.cpp b/llvm/tools/llvm-exegesis/lib/CodeTemplate.cpp
index f3111797993..677bddd10b8 100644
--- a/llvm/tools/llvm-exegesis/lib/CodeTemplate.cpp
+++ b/llvm/tools/llvm-exegesis/lib/CodeTemplate.cpp
@@ -67,15 +67,6 @@ bool InstructionTemplate::hasImmediateVariables() const {
});
}
-void InstructionTemplate::randomizeUnsetVariables(
- const llvm::BitVector &ForbiddenRegs) {
- for (const Variable &Var : Instr.Variables) {
- llvm::MCOperand &AssignedValue = getValueFor(Var);
- if (!AssignedValue.isValid())
- randomize(Instr, Var, AssignedValue, ForbiddenRegs);
- }
-}
-
llvm::MCInst InstructionTemplate::build() const {
llvm::MCInst Result;
Result.setOpcode(Instr.Description->Opcode);
@@ -161,4 +152,13 @@ void setRandomAliasing(const AliasingConfigurations &AliasingConfigurations,
setRegisterOperandValue(randomElement(RandomConf.Uses), UseIB);
}
+void randomizeUnsetVariables(const llvm::BitVector &ForbiddenRegs,
+ InstructionTemplate &IT) {
+ for (const Variable &Var : IT.Instr.Variables) {
+ llvm::MCOperand &AssignedValue = IT.getValueFor(Var);
+ if (!AssignedValue.isValid())
+ randomize(IT.Instr, Var, AssignedValue, ForbiddenRegs);
+ }
+}
+
} // namespace exegesis
OpenPOWER on IntegriCloud