]> granicus.if.org Git - llvm/commitdiff
[PM] Add some debug logging to the new PM inliner to make it easier to
authorChandler Carruth <chandlerc@gmail.com>
Sun, 22 Jan 2017 10:33:58 +0000 (10:33 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Sun, 22 Jan 2017 10:33:58 +0000 (10:33 +0000)
trace its behavior.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292756 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/IPO/Inliner.cpp

index 6e46b4f40dc32381e2e36bd0102124a40aaf747b..ded3ca229278213538adc981651625573a067e58 100644 (file)
@@ -814,6 +814,8 @@ PreservedAnalyses InlinerPass::run(LazyCallGraph::SCC &InitialC,
     if (F.hasFnAttribute(Attribute::OptimizeNone))
       continue;
 
+    DEBUG(dbgs() << "Inlining calls in: " << F.getName() << "\n");
+
     // Get the remarks emission analysis for the caller.
     auto &ORE = FAM.getResult<OptimizationRemarkEmitterAnalysis>(F);
 
@@ -916,6 +918,7 @@ PreservedAnalyses InlinerPass::run(LazyCallGraph::SCC &InitialC,
     // re-use the exact same logic for updating the call graph to reflect the
     // change..
     C = &updateCGAndAnalysisManagerForFunctionPass(CG, *C, N, AM, UR);
+    DEBUG(dbgs() << "Updated inlining SCC: " << *C << "\n");
     RC = &C->getOuterRefSCC();
   } while (!Nodes.empty());