Skip to content

Commit 6d2510d

Browse files
committed
[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
1 parent 9dbc1ab commit 6d2510d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

llvm/tools/llvm-exegesis/lib/SerialSnippetGenerator.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88

99
#include "SerialSnippetGenerator.h"
1010

11-
#include "MCInstrDescView.h"
1211
#include "CodeTemplate.h"
12+
#include "MCInstrDescView.h"
13+
#include "Target.h"
1314
#include <algorithm>
1415
#include <numeric>
1516
#include <vector>
@@ -50,6 +51,8 @@ computeAliasingInstructions(const LLVMState &State, const Instruction *Instr,
5051
const Instruction &OtherInstr = State.getIC().getInstr(OtherOpcode);
5152
if (OtherInstr.hasMemoryOperands())
5253
continue;
54+
if (!State.getExegesisTarget().allowAsBackToBack(OtherInstr))
55+
continue;
5356
if (Instr->hasAliasingRegistersThrough(OtherInstr, ForbiddenRegisters))
5457
AliasingInstructions.push_back(&OtherInstr);
5558
if (AliasingInstructions.size() >= MaxAliasingInstructions)

0 commit comments

Comments
 (0)