forked from OSchip/llvm-project
[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
This commit is contained in:
parent
9dbc1ab232
commit
6d2510d30a
|
@ -8,8 +8,9 @@
|
||||||
|
|
||||||
#include "SerialSnippetGenerator.h"
|
#include "SerialSnippetGenerator.h"
|
||||||
|
|
||||||
#include "MCInstrDescView.h"
|
|
||||||
#include "CodeTemplate.h"
|
#include "CodeTemplate.h"
|
||||||
|
#include "MCInstrDescView.h"
|
||||||
|
#include "Target.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <numeric>
|
#include <numeric>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
@ -50,6 +51,8 @@ computeAliasingInstructions(const LLVMState &State, const Instruction *Instr,
|
||||||
const Instruction &OtherInstr = State.getIC().getInstr(OtherOpcode);
|
const Instruction &OtherInstr = State.getIC().getInstr(OtherOpcode);
|
||||||
if (OtherInstr.hasMemoryOperands())
|
if (OtherInstr.hasMemoryOperands())
|
||||||
continue;
|
continue;
|
||||||
|
if (!State.getExegesisTarget().allowAsBackToBack(OtherInstr))
|
||||||
|
continue;
|
||||||
if (Instr->hasAliasingRegistersThrough(OtherInstr, ForbiddenRegisters))
|
if (Instr->hasAliasingRegistersThrough(OtherInstr, ForbiddenRegisters))
|
||||||
AliasingInstructions.push_back(&OtherInstr);
|
AliasingInstructions.push_back(&OtherInstr);
|
||||||
if (AliasingInstructions.size() >= MaxAliasingInstructions)
|
if (AliasingInstructions.size() >= MaxAliasingInstructions)
|
||||||
|
|
Loading…
Reference in New Issue