[llvm] 77a9e61 - [Attributor][NFC] Improve debug message

Johannes Doerfert via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 11 09:03:38 PST 2020


Author: Johannes Doerfert
Date: 2020-02-11T11:02:59-06:00
New Revision: 77a9e61c9ac89e93809789f904085dbf365829c4

URL: https://github.com/llvm/llvm-project/commit/77a9e61c9ac89e93809789f904085dbf365829c4
DIFF: https://github.com/llvm/llvm-project/commit/77a9e61c9ac89e93809789f904085dbf365829c4.diff

LOG: [Attributor][NFC] Improve debug message

Added: 
    

Modified: 
    llvm/lib/Transforms/IPO/Attributor.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/IPO/Attributor.cpp b/llvm/lib/Transforms/IPO/Attributor.cpp
index 31a7e93b239a..a7b51b314d85 100644
--- a/llvm/lib/Transforms/IPO/Attributor.cpp
+++ b/llvm/lib/Transforms/IPO/Attributor.cpp
@@ -7705,10 +7705,12 @@ static bool runAttributorOnFunctions(InformationCache &InfoCache,
     A.identifyDefaultAbstractAttributes(*F);
   }
 
-  bool Changed = A.run() == ChangeStatus::CHANGED;
+  ChangeStatus Changed = A.run();
   assert(!verifyModule(*Functions.front()->getParent(), &errs()) &&
          "Module verification failed!");
-  return Changed;
+  LLVM_DEBUG(dbgs() << "[Attributor] Done with " << Functions.size()
+                    << " functions, result: " << Changed << ".\n");
+  return Changed == ChangeStatus::CHANGED;
 }
 
 PreservedAnalyses AttributorPass::run(Module &M, ModuleAnalysisManager &AM) {


        


More information about the llvm-commits mailing list