[PATCH] D73256: [llvm-exegesis] Restrict to allowed back-to-back instructions in SerialSnippetGenerator.

Clement Courbet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 23 00:04:01 PST 2020


courbet created this revision.
courbet added reviewers: gchatelet, mstojanovic.
Herald added a subscriber: tschuett.
Herald added a project: LLVM.

Followup to D73161 <https://reviews.llvm.org/D73161>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D73256

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


Index: llvm/tools/llvm-exegesis/lib/SerialSnippetGenerator.cpp
===================================================================
--- llvm/tools/llvm-exegesis/lib/SerialSnippetGenerator.cpp
+++ 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 @@
     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)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73256.239787.patch
Type: text/x-patch
Size: 905 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200123/82f3b06d/attachment.bin>


More information about the llvm-commits mailing list