diff options
author | Reid Kleckner <reid@kleckner.net> | 2014-05-15 20:41:05 +0000 |
---|---|---|
committer | Reid Kleckner <reid@kleckner.net> | 2014-05-15 20:41:05 +0000 |
commit | b16564109bbd3db5195227e34687ddbb55b13588 (patch) | |
tree | d0942a57817b29df4af1596623475b100ee80d57 /llvm/lib | |
parent | 6af21245eb8ed332970f3d30d08efef956a3ce19 (diff) | |
download | bcm5719-llvm-b16564109bbd3db5195227e34687ddbb55b13588.tar.gz bcm5719-llvm-b16564109bbd3db5195227e34687ddbb55b13588.zip |
Revert "Don't insert lifetime.end markers between a musttail call and ret"
This reverts commit r208912.
It was committed accidentally without review.
llvm-svn: 208914
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Transforms/Utils/InlineFunction.cpp | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/llvm/lib/Transforms/Utils/InlineFunction.cpp b/llvm/lib/Transforms/Utils/InlineFunction.cpp index e01d0c38ec4..ab60a400e53 100644 --- a/llvm/lib/Transforms/Utils/InlineFunction.cpp +++ b/llvm/lib/Transforms/Utils/InlineFunction.cpp @@ -755,13 +755,8 @@ bool llvm::InlineFunction(CallSite CS, InlineFunctionInfo &IFI, } builder.CreateLifetimeStart(AI, AllocaSize); - for (ReturnInst *RI : Returns) { - // Don't insert llvm.lifetime.end calls between a musttail call and a - // return. The return kills all local allocas. - if (InlinedMustTailCalls && getPrecedingMustTailCall(RI)) - continue; + for (ReturnInst *RI : Returns) IRBuilder<>(RI).CreateLifetimeEnd(AI, AllocaSize); - } } } @@ -779,13 +774,8 @@ bool llvm::InlineFunction(CallSite CS, InlineFunctionInfo &IFI, // Insert a call to llvm.stackrestore before any return instructions in the // inlined function. - for (ReturnInst *RI : Returns) { - // Don't insert llvm.stackrestore calls between a musttail call and a - // return. The return will restore the stack pointer. - if (InlinedMustTailCalls && getPrecedingMustTailCall(RI)) - continue; + for (ReturnInst *RI : Returns) IRBuilder<>(RI).CreateCall(StackRestore, SavedPtr); - } } // If we are inlining for an invoke instruction, we must make sure to rewrite |