[PATCH] D17732: Introduce @llvm.experimental.deoptimize

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 11 10:50:02 PST 2016


rnk accepted this revision.
rnk added a comment.

I looked at the inliner stuff, and it looks good to me.


================
Comment at: docs/LangRef.rst:12147-12148
@@ +12146,4 @@
+as far as LLVM is concerned, the deoptimization continuation can
+invoke arbitrary side effects, including reading from and writing to
+the entire heap.
+
----------------
I don't think it would be useful to mark these as `musttail`. You will end up fighting with the existing musttail logic, which still merges returns after a tail call into normal control flow.

================
Comment at: lib/Transforms/Utils/InlineFunction.cpp:1841-1843
@@ +1840,5 @@
+
+        Function *NewDeoptIntrinsic = Intrinsic::getDeclaration(
+            Caller->getParent(), Intrinsic::experimental_deoptimize,
+            {Caller->getReturnType()});
+
----------------
Maybe do this outside the loop to save some lookups.


http://reviews.llvm.org/D17732





More information about the llvm-commits mailing list