[PATCH] D94898: [llvm-exegesis] Ignore instructions using custom inserter

Qiu Chaofan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 19 01:05:56 PST 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rG9d2f06445ffa: [llvm-exegesis] Ignore instructions using custom inserter (authored by qiucf).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D94898/new/

https://reviews.llvm.org/D94898

Files:
  llvm/test/tools/llvm-exegesis/PowerPC/unsupported-opcode.s
  llvm/tools/llvm-exegesis/lib/SerialSnippetGenerator.cpp
  llvm/tools/llvm-exegesis/llvm-exegesis.cpp


Index: llvm/tools/llvm-exegesis/llvm-exegesis.cpp
===================================================================
--- llvm/tools/llvm-exegesis/llvm-exegesis.cpp
+++ llvm/tools/llvm-exegesis/llvm-exegesis.cpp
@@ -251,8 +251,9 @@
   const Instruction &Instr = State.getIC().getInstr(Opcode);
   const MCInstrDesc &InstrDesc = Instr.Description;
   // Ignore instructions that we cannot run.
-  if (InstrDesc.isPseudo())
-    return make_error<Failure>("Unsupported opcode: isPseudo");
+  if (InstrDesc.isPseudo() || InstrDesc.usesCustomInsertionHook())
+    return make_error<Failure>(
+        "Unsupported opcode: isPseudo/usesCustomInserter");
   if (InstrDesc.isBranch() || InstrDesc.isIndirectBranch())
     return make_error<Failure>("Unsupported opcode: isBranch/isIndirectBranch");
   if (InstrDesc.isCall() || InstrDesc.isReturn())
Index: llvm/tools/llvm-exegesis/lib/SerialSnippetGenerator.cpp
===================================================================
--- llvm/tools/llvm-exegesis/lib/SerialSnippetGenerator.cpp
+++ llvm/tools/llvm-exegesis/lib/SerialSnippetGenerator.cpp
@@ -51,7 +51,7 @@
     const Instruction &OtherInstr = State.getIC().getInstr(OtherOpcode);
     const MCInstrDesc &OtherInstrDesc = OtherInstr.Description;
     // Ignore instructions that we cannot run.
-    if (OtherInstrDesc.isPseudo() ||
+    if (OtherInstrDesc.isPseudo() || OtherInstrDesc.usesCustomInsertionHook() ||
         OtherInstrDesc.isBranch() || OtherInstrDesc.isIndirectBranch() ||
         OtherInstrDesc.isCall() || OtherInstrDesc.isReturn()) {
           continue;
Index: llvm/test/tools/llvm-exegesis/PowerPC/unsupported-opcode.s
===================================================================
--- /dev/null
+++ llvm/test/tools/llvm-exegesis/PowerPC/unsupported-opcode.s
@@ -0,0 +1,3 @@
+# RUN: llvm-exegesis -mode=latency -opcode-name=SELECT_I8 2>&1 | FileCheck %s
+
+CHECK: Unsupported opcode: isPseudo/usesCustomInserter


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94898.324907.patch
Type: text/x-patch
Size: 1944 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210219/6e94f436/attachment.bin>


More information about the llvm-commits mailing list