From dd807ea799a9737fd0dfaf072c820cf9787c1d8b Mon Sep 17 00:00:00 2001 From: Fedor Sergeev Date: Tue, 14 Aug 2018 15:19:14 +0000 Subject: [PATCH] [Inliner] add inliner stats to new pm version of inliner Increment existing NumInlined and NumDeleted stats in InlinerPass::run. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339682 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/IPO/Inliner.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Transforms/IPO/Inliner.cpp b/lib/Transforms/IPO/Inliner.cpp index 2488527d465..406dd76847a 100644 --- a/lib/Transforms/IPO/Inliner.cpp +++ b/lib/Transforms/IPO/Inliner.cpp @@ -1028,6 +1028,8 @@ PreservedAnalyses InlinerPass::run(LazyCallGraph::SCC &InitialC, DidInline = true; InlinedCallees.insert(&Callee); + ++NumInlined; + emit_inlined_into(ORE, DLoc, Block, Callee, F, *OIC); // Add any new callsites to defined functions to the worklist. @@ -1154,6 +1156,7 @@ PreservedAnalyses InlinerPass::run(LazyCallGraph::SCC &InitialC, // And delete the actual function from the module. M.getFunctionList().erase(DeadF); + ++NumDeleted; } if (!Changed) -- 2.11.0