mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
Revert "Don't insert lifetime.end markers between a musttail call and ret"
This reverts commit r208912. It was committed accidentally without review. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208914 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user