Lower @llvm.experimental.deoptimize as a noreturn call
While preserving the return value for @llvm.experimental.deoptimize at
the IR level is useful during mid-level optimization, doing so at the
machine instruction level requires generating some extra code and a
return that is non-ideal. This change has LLVM lower
```
%val = call @llvm.experimental.deoptimize
ret %val
```
to effectively
```
call @__llvm_deoptimize()
unreachable
```
instead.
llvm-svn: 265502
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
index 214c510..2d20026 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
@@ -779,10 +779,12 @@
const BasicBlock *EHPadBB);
void LowerDeoptimizeCall(const CallInst *CI);
+ void LowerDeoptimizingReturn();
void LowerCallSiteWithDeoptBundleImpl(ImmutableCallSite CS, SDValue Callee,
const BasicBlock *EHPadBB,
- bool VarArgDisallowed);
+ bool VarArgDisallowed,
+ bool ForceVoidReturnTy);
private:
// Terminator instructions.