diff options
| author | Sanjoy Das <sanjoy@playingwithpointers.com> | 2016-04-09 00:22:59 +0000 |
|---|---|---|
| committer | Sanjoy Das <sanjoy@playingwithpointers.com> | 2016-04-09 00:22:59 +0000 |
| commit | dd77e1e6a53cbf807783492706bcfa7a5d849148 (patch) | |
| tree | 0b317d72437ea889573c4eae421104b3e0dc8394 /llvm/lib | |
| parent | 94e29668b0e53d9792c40671308cae8320325405 (diff) | |
| download | bcm5719-llvm-dd77e1e6a53cbf807783492706bcfa7a5d849148.tar.gz bcm5719-llvm-dd77e1e6a53cbf807783492706bcfa7a5d849148.zip | |
Maintain calling convention when inling calls to llvm.deoptimize
The behavior here was buggy -- we'd forget the calling convention after
inlining a callsite calling llvm.deoptimize.
llvm-svn: 265867
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Transforms/Utils/InlineFunction.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/InlineFunction.cpp b/llvm/lib/Transforms/Utils/InlineFunction.cpp index 646afd8cd61..0c4ffd93dbf 100644 --- a/llvm/lib/Transforms/Utils/InlineFunction.cpp +++ b/llvm/lib/Transforms/Utils/InlineFunction.cpp @@ -1843,6 +1843,7 @@ bool llvm::InlineFunction(CallSite CS, InlineFunctionInfo &IFI, continue; } + auto CallingConv = DeoptCall->getCallingConv(); auto *CurBB = RI->getParent(); RI->eraseFromParent(); @@ -1856,8 +1857,9 @@ bool llvm::InlineFunction(CallSite CS, InlineFunctionInfo &IFI, "Expected at least the deopt operand bundle"); IRBuilder<> Builder(CurBB); - Value *NewDeoptCall = + CallInst *NewDeoptCall = Builder.CreateCall(NewDeoptIntrinsic, CallArgs, OpBundles); + NewDeoptCall->setCallingConv(CallingConv); if (NewDeoptCall->getType()->isVoidTy()) Builder.CreateRetVoid(); else |

