[NFC][Inliner] Debugging support to print funtion size after each inlining.

Reviewed By: wenlei

Differential Revision: https://reviews.llvm.org/D98439
This commit is contained in:
Hongtao Yu 2021-03-11 10:38:15 -08:00
parent 633549f73e
commit beea06c106
1 changed files with 6 additions and 1 deletions

View File

@ -776,7 +776,9 @@ PreservedAnalyses InlinerPass::run(LazyCallGraph::SCC &InitialC,
if (CG.lookupSCC(N) != C)
continue;
LLVM_DEBUG(dbgs() << "Inlining calls in: " << F.getName() << "\n");
LLVM_DEBUG(dbgs() << "Inlining calls in: " << F.getName() << "\n"
<< " Function size: " << F.getInstructionCount()
<< "\n");
auto GetAssumptionCache = [&](Function &F) -> AssumptionCache & {
return FAM.getResult<AssumptionAnalysis>(F);
@ -837,6 +839,9 @@ PreservedAnalyses InlinerPass::run(LazyCallGraph::SCC &InitialC,
InlinedCallees.insert(&Callee);
++NumInlined;
LLVM_DEBUG(dbgs() << " Size after inlining: "
<< F.getInstructionCount() << "\n");
// Add any new callsites to defined functions to the worklist.
if (!IFI.InlinedCallSites.empty()) {
int NewHistoryID = InlineHistory.size();