summaryrefslogtreecommitdiff
path: root/lib/Transforms/IPO/Inliner.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-12-06 07:38:40 +0000
committerChris Lattner <sabre@nondot.org>2010-12-06 07:38:40 +0000
commit7d32b8032d7ec2472b994aab2ac3459e8d47c496 (patch)
tree2d8a90d6797b7ac08bb97ef9e9378f09f01f4b41 /lib/Transforms/IPO/Inliner.cpp
parent476d2f769e6bf008b07f5130ca68a4930434d996 (diff)
downloadllvm-7d32b8032d7ec2472b994aab2ac3459e8d47c496.tar.gz
llvm-7d32b8032d7ec2472b994aab2ac3459e8d47c496.tar.bz2
llvm-7d32b8032d7ec2472b994aab2ac3459e8d47c496.tar.xz
improve -debug output and comments a little.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120993 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO/Inliner.cpp')
-rw-r--r--lib/Transforms/IPO/Inliner.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Transforms/IPO/Inliner.cpp b/lib/Transforms/IPO/Inliner.cpp
index 55f2815461..0d6b39f876 100644
--- a/lib/Transforms/IPO/Inliner.cpp
+++ b/lib/Transforms/IPO/Inliner.cpp
@@ -153,19 +153,21 @@ static bool InlineCallIfPossible(CallSite CS, InlineFunctionInfo &IFI,
// Otherwise, we *can* reuse it, RAUW AI into AvailableAlloca and declare
// success!
- DEBUG(dbgs() << " ***MERGED ALLOCA: " << *AI);
+ DEBUG(dbgs() << " ***MERGED ALLOCA: " << *AI << "\n\t\tINTO: "
+ << *AvailableAlloca << '\n');
AI->replaceAllUsesWith(AvailableAlloca);
AI->eraseFromParent();
MergedAwayAlloca = true;
++NumMergedAllocas;
+ IFI.StaticAllocas[AllocaNo] = 0;
break;
}
// If we already nuked the alloca, we're done with it.
if (MergedAwayAlloca)
continue;
-
+
// If we were unable to merge away the alloca either because there are no
// allocas of the right type available or because we reused them all
// already, remember that this alloca came from an inlined function and mark
@@ -402,7 +404,7 @@ bool Inliner::runOnSCC(CallGraphSCC &SCC) {
// If this call site was obtained by inlining another function, verify
// that the include path for the function did not include the callee
- // itself. If so, we'd be recursively inlinling the same function,
+ // itself. If so, we'd be recursively inlining the same function,
// which would provide the same callsites, which would cause us to
// infinitely inline.
int InlineHistoryID = CallSites[CSi].second;