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

Hongtao Yu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 11 10:42:34 PST 2021


hoy created this revision.
Herald added subscribers: wenlei, hiraditya, eraman.
hoy requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D98439

Files:
  llvm/lib/Transforms/IPO/Inliner.cpp


Index: llvm/lib/Transforms/IPO/Inliner.cpp
===================================================================
--- llvm/lib/Transforms/IPO/Inliner.cpp
+++ llvm/lib/Transforms/IPO/Inliner.cpp
@@ -776,7 +776,9 @@
     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 @@
       InlinedCallees.insert(&Callee);
       ++NumInlined;
 
+      LLVM_DEBUG(dbgs() << "    Function size: " << F.getInstructionCount()
+                        << "\n");
+
       // Add any new callsites to defined functions to the worklist.
       if (!IFI.InlinedCallSites.empty()) {
         int NewHistoryID = InlineHistory.size();


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98439.330024.patch
Type: text/x-patch
Size: 998 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210311/59f0b6b3/attachment.bin>


More information about the llvm-commits mailing list