[PATCH] D86360: Add new hidden option -print-changed which only reports changes to IR

Jamie Schmeiser via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 3 07:11:27 PDT 2020


jamieschmeiser updated this revision to Diff 289715.
jamieschmeiser added a comment.

Respond to review comments:  fix comment and remove unnecessary test
 from isInterestingFunction.  Also, mark some functions inline.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D86360/new/

https://reviews.llvm.org/D86360

Files:
  llvm/lib/Passes/StandardInstrumentations.cpp


Index: llvm/lib/Passes/StandardInstrumentations.cpp
===================================================================
--- llvm/lib/Passes/StandardInstrumentations.cpp
+++ llvm/lib/Passes/StandardInstrumentations.cpp
@@ -56,7 +56,7 @@
 // -filter-print-funcs and -print-module-scope options will do similar
 // filtering based on function name, reporting changed IRs as functions(or
 // modules if -print-module-scope is specified) for a particular function
-// or indicating that the IR has been filtered out.  The exta options
+// or indicating that the IR has been filtered out.  The extra options
 // can be combined, allowing only changed IRs for certain passes on certain
 // functions to be reported in different formats, with the rest being
 // reported as filtered out.
@@ -219,18 +219,18 @@
 }
 
 // Return true when this is a pass for which printing of changes is desired.
-bool isIgnored(StringRef PassID) {
+inline bool isIgnored(StringRef PassID) {
   return PassID.startswith("PassManager<") || PassID.contains("PassAdaptor<");
 }
 
 // Return true when this is a defined function for which printing
 // of changes is desired.
-bool isInterestingFunction(const Function &F) {
-  return !F.isDeclaration() && llvm::isFunctionInPrintList(F.getName());
+inline bool isInterestingFunction(const Function &F) {
+  return llvm::isFunctionInPrintList(F.getName());
 }
 
 // Return true when this is a pass for which printing of changes is desired.
-bool isInterestingPass(StringRef PassID) {
+inline bool isInterestingPass(StringRef PassID) {
   if (isIgnored(PassID))
     return false;
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86360.289715.patch
Type: text/x-patch
Size: 1599 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200903/69d35ab4/attachment.bin>


More information about the llvm-commits mailing list