[gc.statepoint] Change gc.statepoint intrinsic's return type to token type instead...
authorChen Li <meloli87@gmail.com>
Sat, 26 Dec 2015 07:54:32 +0000 (07:54 +0000)
committerChen Li <meloli87@gmail.com>
Sat, 26 Dec 2015 07:54:32 +0000 (07:54 +0000)
commit955318d58de6f3a5ca768c00de715891f607f64f
tree5a90b8ddc0585dea8562d814e32c4af173b33292
parentd8ff987182e8913d8a75cc4604998e1c4cde9e80
[gc.statepoint] Change gc.statepoint intrinsic's return type to token type instead of i32 type

Summary: This patch changes gc.statepoint intrinsic's return type to token type instead of i32 type. Using token types could prevent LLVM to merge different gc.statepoint nodes into PHI nodes and cause further problems with gc relocations. The patch also changes the way on how gc.relocate and gc.result look for their corresponding gc.statepoint on unwind path. The current implementation uses the selector value extracted from a { i8*, i32 } landingpad as a hook to find the gc.statepoint, while the patch directly uses a token type landingpad (http://reviews.llvm.org/D15405) to find the gc.statepoint.

Reviewers: sanjoy, JosephTremoulet, pgavlin, igor-laevsky, mjacob

Subscribers: reames, mjacob, sanjoy, llvm-commits

Differential Revision: http://reviews.llvm.org/D15662

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256443 91177308-0d34-0410-b5e6-96231b3b80d8
63 files changed:
docs/Statepoints.rst
include/llvm/IR/Intrinsics.td
include/llvm/IR/Statepoint.h
lib/IR/Verifier.cpp
lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
test/Analysis/CallGraph/non-leaf-intrinsics.ll
test/Analysis/LazyCallGraph/non-leaf-intrinsics.ll
test/Analysis/ValueTracking/memory-dereferenceable.ll
test/CodeGen/Generic/overloaded-intrinsic-name.ll
test/CodeGen/X86/statepoint-allocas.ll
test/CodeGen/X86/statepoint-call-lowering.ll
test/CodeGen/X86/statepoint-far-call.ll
test/CodeGen/X86/statepoint-forward.ll
test/CodeGen/X86/statepoint-gctransition-call-lowering.ll
test/CodeGen/X86/statepoint-invoke.ll
test/CodeGen/X86/statepoint-stack-usage.ll
test/CodeGen/X86/statepoint-stackmap-format.ll
test/Transforms/CodeGenPrepare/statepoint-relocate.ll
test/Transforms/InstCombine/gc.relocate.ll
test/Transforms/InstCombine/statepoint.ll
test/Transforms/PlaceSafepoints/call_gc_result.ll
test/Transforms/PlaceSafepoints/patchable-statepoints.ll
test/Transforms/PlaceSafepoints/statepoint-calling-conventions.ll
test/Transforms/PlaceSafepoints/statepoint-format.ll
test/Transforms/RewriteStatepointsForGC/base-pointers-1.ll
test/Transforms/RewriteStatepointsForGC/base-pointers-10.ll
test/Transforms/RewriteStatepointsForGC/base-pointers-11.ll
test/Transforms/RewriteStatepointsForGC/base-pointers-2.ll
test/Transforms/RewriteStatepointsForGC/base-pointers-3.ll
test/Transforms/RewriteStatepointsForGC/base-pointers-4.ll
test/Transforms/RewriteStatepointsForGC/base-pointers-5.ll
test/Transforms/RewriteStatepointsForGC/base-pointers-6.ll
test/Transforms/RewriteStatepointsForGC/base-pointers-7.ll
test/Transforms/RewriteStatepointsForGC/base-pointers-8.ll
test/Transforms/RewriteStatepointsForGC/base-pointers-9.ll
test/Transforms/RewriteStatepointsForGC/base-pointers.ll
test/Transforms/RewriteStatepointsForGC/base-vector.ll
test/Transforms/RewriteStatepointsForGC/basics.ll
test/Transforms/RewriteStatepointsForGC/codegen-cond.ll
test/Transforms/RewriteStatepointsForGC/constants.ll
test/Transforms/RewriteStatepointsForGC/deopt-bundles/base-pointers-4.ll
test/Transforms/RewriteStatepointsForGC/deopt-bundles/basic.ll
test/Transforms/RewriteStatepointsForGC/deopt-bundles/basics.ll
test/Transforms/RewriteStatepointsForGC/deopt-bundles/gc-relocate-creation.ll
test/Transforms/RewriteStatepointsForGC/deopt-bundles/live-vector.ll
test/Transforms/RewriteStatepointsForGC/deopt-bundles/patchable-statepoints.ll
test/Transforms/RewriteStatepointsForGC/deopt-bundles/rematerialize-derived-pointers.ll
test/Transforms/RewriteStatepointsForGC/deopt-bundles/rewrite-invoke.ll
test/Transforms/RewriteStatepointsForGC/deref-pointers.ll
test/Transforms/RewriteStatepointsForGC/gc_relocate_creation.ll
test/Transforms/RewriteStatepointsForGC/live-vector.ll
test/Transforms/RewriteStatepointsForGC/liveness-basics.ll
test/Transforms/RewriteStatepointsForGC/preprocess.ll
test/Transforms/RewriteStatepointsForGC/relocate_invoke_result.ll
test/Transforms/RewriteStatepointsForGC/relocation.ll
test/Transforms/RewriteStatepointsForGC/rematerialize-derived-pointers.ll
test/Transforms/SimplifyCFG/statepoint-invoke-unwind.ll
test/Verifier/gc_relocate_addrspace.ll
test/Verifier/gc_relocate_operand.ll
test/Verifier/gc_relocate_return.ll
test/Verifier/invalid-statepoint.ll
test/Verifier/invalid-statepoint2.ll
test/Verifier/statepoint.ll