[llvm] [TableGen] New tblgen Instruction bit to disable DAGISel pattern imports (PR #88382)

Pierre van Houtryve via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 15 08:05:18 PDT 2024


================
@@ -165,8 +165,21 @@ void DAGISelEmitter::run(raw_ostream &OS) {
   // Add all the patterns to a temporary list so we can sort them.
   Records.startTimer("Sort patterns");
   std::vector<const PatternToMatch *> Patterns;
-  for (const PatternToMatch &PTM : CGP.ptms())
+  for (const PatternToMatch &PTM : CGP.ptms()) {
+
+    // Disable import of patterns marked as ignore.
+    const TreePatternNode &Dst = PTM.getDstPattern();
+    if (!Dst.isLeaf()) {
+      const Record *Op = Dst.getOperator();
+      const bool shouldIgnore =
----------------
Pierre-vh wrote:

`CamelCase`

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


More information about the llvm-commits mailing list