[PATCH] D15662: [gc.statepoint] Change gc.statepoint intrinsic's return type to token type instead of i32 type

Chen Li via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 18 21:43:07 PST 2015


chenli created this revision.
chenli added reviewers: igor-laevsky, sanjoy, JosephTremoulet, pgavlin.
chenli added a subscriber: llvm-commits.
Herald added a subscriber: sanjoy.

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. 

http://reviews.llvm.org/D15662

Files:
  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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15662.43295.patch
Type: text/x-patch
Size: 188498 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151219/385d2a36/attachment-0001.bin>


More information about the llvm-commits mailing list