diff options
author | Sanjoy Das <sanjoy@playingwithpointers.com> | 2016-03-31 00:18:46 +0000 |
---|---|---|
committer | Sanjoy Das <sanjoy@playingwithpointers.com> | 2016-03-31 00:18:46 +0000 |
commit | 021de058df7ff14b279e434e1fbea4b468a47cd5 (patch) | |
tree | b46f67f86c22331a30b9674d835df29d6d45045b /llvm/lib/Transforms/Utils/InlineFunction.cpp | |
parent | 21d3bffe299ddb505cd9ae4f78fbdf92d61477c7 (diff) | |
download | bcm5719-llvm-021de058df7ff14b279e434e1fbea4b468a47cd5.tar.gz bcm5719-llvm-021de058df7ff14b279e434e1fbea4b468a47cd5.zip |
Introduce a @llvm.experimental.guard intrinsic
Summary:
As discussed on llvm-dev[1].
This change adds the basic boilerplate code around having this intrinsic
in LLVM:
- Changes in Intrinsics.td, and the IR Verifier
- A lowering pass to lower @llvm.experimental.guard to normal
control flow
- Inliner support
[1]: http://lists.llvm.org/pipermail/llvm-dev/2016-February/095523.html
Reviewers: reames, atrick, chandlerc, rnk, JosephTremoulet, echristo
Subscribers: mcrosier, llvm-commits
Differential Revision: http://reviews.llvm.org/D18527
llvm-svn: 264976
Diffstat (limited to 'llvm/lib/Transforms/Utils/InlineFunction.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/InlineFunction.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/Utils/InlineFunction.cpp b/llvm/lib/Transforms/Utils/InlineFunction.cpp index 31cf5fbdc85..50eff521318 100644 --- a/llvm/lib/Transforms/Utils/InlineFunction.cpp +++ b/llvm/lib/Transforms/Utils/InlineFunction.cpp @@ -428,12 +428,14 @@ static BasicBlock *HandleCallsInBlockInlinedThroughInvoke( continue; // We do not need to (and in fact, cannot) convert possibly throwing calls - // to @llvm.experimental_deoptimize into invokes. The caller's "segment" of - // the deoptimization continuation attached to the newly inlined - // @llvm.experimental_deoptimize call should contain the exception handling - // logic, if any. + // to @llvm.experimental_deoptimize (resp. @llvm.experimental.guard) into + // invokes. The caller's "segment" of the deoptimization continuation + // attached to the newly inlined @llvm.experimental_deoptimize + // (resp. @llvm.experimental.guard) call should contain the exception + // handling logic, if any. if (auto *F = CI->getCalledFunction()) - if (F->getIntrinsicID() == Intrinsic::experimental_deoptimize) + if (F->getIntrinsicID() == Intrinsic::experimental_deoptimize || + F->getIntrinsicID() == Intrinsic::experimental_guard) continue; if (auto FuncletBundle = CI->getOperandBundle(LLVMContext::OB_funclet)) { |