[llvm] 6d2510d - [llvm-exegesis] Restrict to allowed back-to-back instructions in SerialSnippetGenerator.
Clement Courbet via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 23 01:00:21 PST 2020
Author: Clement Courbet
Date: 2020-01-23T10:00:05+01:00
New Revision: 6d2510d30a01927546f115810fff82609c7ae9dd
URL: https://github.com/llvm/llvm-project/commit/6d2510d30a01927546f115810fff82609c7ae9dd
DIFF: https://github.com/llvm/llvm-project/commit/6d2510d30a01927546f115810fff82609c7ae9dd.diff
LOG: [llvm-exegesis] Restrict to allowed back-to-back instructions in SerialSnippetGenerator.
Summary: Followup to D73161.
Reviewers: gchatelet, mstojanovic
Subscribers: tschuett, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D73256
Added:
Modified:
llvm/tools/llvm-exegesis/lib/SerialSnippetGenerator.cpp
Removed:
################################################################################
diff --git a/llvm/tools/llvm-exegesis/lib/SerialSnippetGenerator.cpp b/llvm/tools/llvm-exegesis/lib/SerialSnippetGenerator.cpp
index b0c881c4d62b..503c77c2ab6b 100644
--- a/llvm/tools/llvm-exegesis/lib/SerialSnippetGenerator.cpp
+++ b/llvm/tools/llvm-exegesis/lib/SerialSnippetGenerator.cpp
@@ -8,8 +8,9 @@
#include "SerialSnippetGenerator.h"
-#include "MCInstrDescView.h"
#include "CodeTemplate.h"
+#include "MCInstrDescView.h"
+#include "Target.h"
#include <algorithm>
#include <numeric>
#include <vector>
@@ -50,6 +51,8 @@ computeAliasingInstructions(const LLVMState &State, const Instruction *Instr,
const Instruction &OtherInstr = State.getIC().getInstr(OtherOpcode);
if (OtherInstr.hasMemoryOperands())
continue;
+ if (!State.getExegesisTarget().allowAsBackToBack(OtherInstr))
+ continue;
if (Instr->hasAliasingRegistersThrough(OtherInstr, ForbiddenRegisters))
AliasingInstructions.push_back(&OtherInstr);
if (AliasingInstructions.size() >= MaxAliasingInstructions)
More information about the llvm-commits
mailing list