[llvm] [SelectionDAG] Add support to filter SelectionDAG dumps during ISel by function names (PR #72696)
Paul Kirth via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 17 16:32:19 PST 2023
================
@@ -180,6 +182,15 @@ static const bool ViewDAGCombine1 = false, ViewLegalizeTypesDAGs = false,
ViewSchedDAGs = false, ViewSUnitDAGs = false;
#endif
+#define ISEL_DUMP(F, X) \
+ do { \
+ if (llvm::DebugFlag && (isCurrentDebugType(DEBUG_TYPE) || \
+ (isCurrentDebugType(ISEL_DUMP_DEBUG_TYPE) && \
+ isFunctionInPrintList(F)))) { \
----------------
ilovepi wrote:
This seems a bit heavy to check at every site, right? I think we could at least cache `isFunctionInPrintList(F)` at the start of the pass. Off the top of my head, I can't think of a nicer way to check the `DEBUG_TYPE` in the current implementation, but maybe alternate structure would help?
Maybe I'm overthinking this detail though, and perf isn't so important if you're debug printing something ...
https://github.com/llvm/llvm-project/pull/72696
More information about the llvm-commits
mailing list