[RS4GC] Lower calls to @llvm.experimental.deoptimize
authorSanjoy Das <sanjoy@playingwithpointers.com>
Fri, 25 Mar 2016 20:12:13 +0000 (20:12 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Fri, 25 Mar 2016 20:12:13 +0000 (20:12 +0000)
commitd4c783335b9a082071f1196db85c1f2d65746103
treec8a54e934f6122dd3512d1b6e79fb0fca39cdd27
parentec0e7d2582abe0169ebde8fb2105d998bdc79d4d
[RS4GC] Lower calls to @llvm.experimental.deoptimize

This changes RS4GC to lower calls to ``@llvm.experimental.deoptimize``
to gc.statepoints wrapping ``__llvm_deoptimize``, and changes
``callsGCLeafFunction`` to recognize ``@llvm.experimental.deoptimize``
as a non GC leaf function.

I've had to hard code the ``"__llvm_deoptimize"`` name in
RewriteStatepointsForGC; since ``TargetLibraryInfo`` is available only
during codegen.  This isn't without precedent in the codebase, so I'm
not overtly concerned.

llvm-svn: 264456
llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
llvm/lib/Transforms/Utils/Local.cpp
llvm/test/Transforms/RewriteStatepointsForGC/deopt-intrinsic.ll [new file with mode: 0644]