mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-08 13:36:26 +00:00
Improve the -filter-print-funcs
option to skip the banner for CGSCC pass when nothing is to be printed
Before, it would print a sequence of: *** IR Dump After Function Integration/Inlining ****** *** IR Dump After Function Integration/Inlining ****** *** IR Dump After Function Integration/Inlining ****** ... for every single function in the module. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292442 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4683557a5f
commit
01355e8599
@ -609,13 +609,23 @@ namespace {
|
||||
}
|
||||
|
||||
bool runOnSCC(CallGraphSCC &SCC) override {
|
||||
Out << Banner;
|
||||
auto PrintBannerOnce = [&] () {
|
||||
static bool BannerPrinted = false;
|
||||
if (BannerPrinted)
|
||||
return;
|
||||
Out << Banner;
|
||||
BannerPrinted = true;
|
||||
};
|
||||
for (CallGraphNode *CGN : SCC) {
|
||||
if (CGN->getFunction()) {
|
||||
if (isFunctionInPrintList(CGN->getFunction()->getName()))
|
||||
if (isFunctionInPrintList(CGN->getFunction()->getName())) {
|
||||
PrintBannerOnce();
|
||||
CGN->getFunction()->print(Out);
|
||||
} else
|
||||
}
|
||||
} else if (llvm::isFunctionInPrintList("*")) {
|
||||
PrintBannerOnce();
|
||||
Out << "\nPrinting <null> Function\n";
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user