Skip to content

Commit a356dae

Browse files
author
kpyzhov
committed
[RegionPass] Added check for -filter-print-funcs option to the region IR dumps.
Differential Revision: https://reviews.llvm.org/D114310
1 parent 37d7299 commit a356dae

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

llvm/lib/Analysis/RegionPass.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include "llvm/Analysis/RegionPass.h"
1616
#include "llvm/IR/OptBisect.h"
1717
#include "llvm/IR/PassTimingInfo.h"
18+
#include "llvm/IR/PrintPasses.h"
1819
#include "llvm/IR/StructuralHash.h"
1920
#include "llvm/Support/Debug.h"
2021
#include "llvm/Support/Timer.h"
@@ -187,6 +188,8 @@ class PrintRegionPass : public RegionPass {
187188
}
188189

189190
bool runOnRegion(Region *R, RGPassManager &RGM) override {
191+
if (!isFunctionInPrintList(R->getEntry()->getParent()->getName()))
192+
return false;
190193
Out << Banner;
191194
for (const auto *BB : R->blocks()) {
192195
if (BB)

0 commit comments

Comments
 (0)