diff options
author | Weiming Zhao <weimingz@codeaurora.org> | 2016-01-06 18:20:25 +0000 |
---|---|---|
committer | Weiming Zhao <weimingz@codeaurora.org> | 2016-01-06 18:20:25 +0000 |
commit | eac06368053bd1e7082b5ab7efcd6f9c7014d589 (patch) | |
tree | 0d07c5c52b63ddac0d8345db928893a825dd3bd2 /llvm/lib/Analysis/CallGraphSCCPass.cpp | |
parent | c7c18d6d14f5d95e1a940ee4841e8ba74d8f9078 (diff) | |
download | bcm5719-llvm-eac06368053bd1e7082b5ab7efcd6f9c7014d589.tar.gz bcm5719-llvm-eac06368053bd1e7082b5ab7efcd6f9c7014d589.zip |
Filtering IR printing for print-after-all/print-before-all
Summary:
This patch implements "-print-funcs" option to support function filtering for IR printing like -print-after-all, -print-before etc.
Examples:
-print-after-all -print-funcs=foo,bar
Reviewers: mcrosier, joker.eph
Subscribers: tejohnson, joker.eph, llvm-commits
Differential Revision: http://reviews.llvm.org/D15776
llvm-svn: 256952
Diffstat (limited to 'llvm/lib/Analysis/CallGraphSCCPass.cpp')
-rw-r--r-- | llvm/lib/Analysis/CallGraphSCCPass.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/CallGraphSCCPass.cpp b/llvm/lib/Analysis/CallGraphSCCPass.cpp index 07b389a2a13..6dd1d0a066b 100644 --- a/llvm/lib/Analysis/CallGraphSCCPass.cpp +++ b/llvm/lib/Analysis/CallGraphSCCPass.cpp @@ -612,9 +612,10 @@ namespace { bool runOnSCC(CallGraphSCC &SCC) override { Out << Banner; for (CallGraphNode *CGN : SCC) { - if (CGN->getFunction()) - CGN->getFunction()->print(Out); - else + if (CGN->getFunction()) { + if (isFunctionInPrintList(CGN->getFunction()->getName())) + CGN->getFunction()->print(Out); + } else Out << "\nPrinting <null> Function\n"; } return false; |