[llvm] [llvm-mca] Add -skip-unsupported-instructions option (PR #89733)

Michael Maitland via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 24 09:35:58 PDT 2024


================
@@ -597,14 +610,25 @@ int main(int argc, char **argv) {
           // Default case.
           WithColor::error() << toString(std::move(NewE));
         }
+        if (SkipUnsupportedInstructions) {
+          DroppedInsts.insert(&MCI);
+          continue;
+        }
         return 1;
       }
 
       IPP->postProcessInstruction(Inst.get(), MCI);
-
+      InstToInstruments.insert({&MCI, Instruments});
       LoweredSequence.emplace_back(std::move(Inst.get()));
     }
 
+    Insts = Region->dropInstructions(DroppedInsts);
+
+    // Skip empty regions.
+    if (Insts.empty())
----------------
michaelmaitland wrote:

Why not use `Region->empty()`? Does this change break `Region->empty()`?

https://github.com/llvm/llvm-project/pull/89733


More information about the llvm-commits mailing list