[llvm] [SelectionDAG] Add support to filter SelectionDAG dumps during ISel by function names (PR #72696)

Min-Yih Hsu via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 20 13:42:07 PST 2023


================
@@ -180,6 +182,21 @@ static const bool ViewDAGCombine1 = false, ViewLegalizeTypesDAGs = false,
                   ViewSchedDAGs = false, ViewSUnitDAGs = false;
 #endif
 
+#ifndef NDEBUG
+#define ISEL_DUMP(X)                                                           \
+  do {                                                                         \
+    if (llvm::DebugFlag &&                                                     \
+        (isCurrentDebugType(DEBUG_TYPE) ||                                     \
+         (isCurrentDebugType(ISEL_DUMP_DEBUG_TYPE) && MatchFilterFuncName))) { \
+      X;                                                                       \
+    }                                                                          \
+  } while (false)
+#else
+#define ISEL_DUMP(X)                                                           \
----------------
mshockwave wrote:

Well, since we don't need to pass the formatting check to commit this change, I'll just make it one-line.

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


More information about the llvm-commits mailing list