[PATCH] D114310: Added check for "-filter-print-funcs" option to the region IR dumps.
Konstantin Pyzhov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 19 19:50:32 PST 2021
kpyzhov created this revision.
Herald added a subscriber: hiraditya.
kpyzhov requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D114310
Files:
llvm/lib/Analysis/RegionPass.cpp
Index: llvm/lib/Analysis/RegionPass.cpp
===================================================================
--- llvm/lib/Analysis/RegionPass.cpp
+++ llvm/lib/Analysis/RegionPass.cpp
@@ -14,6 +14,7 @@
//===----------------------------------------------------------------------===//
#include "llvm/Analysis/RegionPass.h"
#include "llvm/IR/OptBisect.h"
+#include "llvm/IR/PrintPasses.h"
#include "llvm/IR/PassTimingInfo.h"
#include "llvm/IR/StructuralHash.h"
#include "llvm/Support/Debug.h"
@@ -187,12 +188,14 @@
}
bool runOnRegion(Region *R, RGPassManager &RGM) override {
- Out << Banner;
- for (const auto *BB : R->blocks()) {
- if (BB)
- BB->print(Out);
+ if (isFunctionInPrintList(R->getEntry()->getParent()->getName())) {
+ Out << Banner;
+ for (const auto *BB : R->blocks()) {
+ if (BB)
+ BB->print(Out);
else
- Out << "Printing <null> Block";
+ Out << "Printing <null> Block";
+ }
}
return false;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114310.388682.patch
Type: text/x-patch
Size: 1003 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211120/05ae3de9/attachment-0001.bin>
More information about the llvm-commits
mailing list