diff options
author | Chris Lattner <sabre@nondot.org> | 2010-05-01 17:19:38 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-05-01 17:19:38 +0000 |
commit | 83f66fe6144c2041f1f7897f7015b0e2e68faad3 (patch) | |
tree | 768d5fbb94092203dbfa9d7708c4b7ddd40a2424 /lib/Transforms/IPO/Inliner.cpp | |
parent | d014761c9337f270f497aa960d51ee424bb166d5 (diff) | |
download | external_llvm-83f66fe6144c2041f1f7897f7015b0e2e68faad3.zip external_llvm-83f66fe6144c2041f1f7897f7015b0e2e68faad3.tar.gz external_llvm-83f66fe6144c2041f1f7897f7015b0e2e68faad3.tar.bz2 |
revert r102831. We already delete dead readonly calls in
other places, killing a valid transformation is not the right
answer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102850 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO/Inliner.cpp')
-rw-r--r-- | lib/Transforms/IPO/Inliner.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/Transforms/IPO/Inliner.cpp b/lib/Transforms/IPO/Inliner.cpp index 875c4fd..b785bb0 100644 --- a/lib/Transforms/IPO/Inliner.cpp +++ b/lib/Transforms/IPO/Inliner.cpp @@ -33,8 +33,7 @@ using namespace llvm; STATISTIC(NumInlined, "Number of functions inlined"); -// FIXME: Uncomment once call deletion xform is made safe -// STATISTIC(NumCallsDeleted, "Number of call sites deleted, not inlined"); +STATISTIC(NumCallsDeleted, "Number of call sites deleted, not inlined"); STATISTIC(NumDeleted, "Number of functions deleted because all callers found"); STATISTIC(NumMergedAllocas, "Number of allocas merged together"); @@ -383,9 +382,6 @@ bool Inliner::runOnSCC(CallGraphSCC &SCC) { Function *Caller = CS.getCaller(); Function *Callee = CS.getCalledFunction(); - // FIXME: This transformation is not legal unless we can prove - // that the callee always terminates. -#if 0 // If this call site is dead and it is to a readonly function, we should // just delete the call instead of trying to inline it, regardless of // size. This happens because IPSCCP propagates the result out of the @@ -400,7 +396,6 @@ bool Inliner::runOnSCC(CallGraphSCC &SCC) { // Update the cached cost info with the missing call growCachedCostInfo(Caller, NULL); } else { -#endif // We can only inline direct calls to non-declarations. if (Callee == 0 || Callee->isDeclaration()) continue; @@ -442,9 +437,7 @@ bool Inliner::runOnSCC(CallGraphSCC &SCC) { // Update the cached cost info with the inlined call. growCachedCostInfo(Caller, Callee); -#if 0 } -#endif // If we inlined or deleted the last possible call site to the function, // delete the function body now. |