llvm-mirror/test/Transforms/RewriteStatepointsForGC
Philip Reames 686905fa4d [statepoints][experimental] Add support for live-in semantics of values in deopt bundles
This is a first step towards supporting deopt value lowering and reporting entirely with the register allocator. I hope to build on this in the near future to support live-on-return semantics, but I have a use case which allows me to test and investigate code quality with just the live-in semantics so I've chosen to start there. For those curious, my use cases is our implementation of the "__llvm_deoptimize" function we bind to @llvm.deoptimize. I'm choosing not to hard code that fact in the patch and instead make it configurable via function attributes.

The basic approach here is modelled on what is done for the "Live In" values on stackmaps and patchpoints. (A secondary goal here is to remove one of the last barriers to merging the pseudo instructions.) We start by adding the operands directly to the STATEPOINT SDNode. Once we've lowered to MI, we extend the remat logic used by the register allocator to fold virtual register uses into StackMap::Indirect entries as needed. This does rely on the fact that the register allocator rematerializes. If it didn't along some code path, we could end up with more vregs than physical registers and fail to allocate.

Today, we *only* fold in the register allocator. This can create some weird effects when combined with arguments passed on the stack because we don't fold them appropriately. I have an idea how to fix that, but it needs this patch in place to work on that effectively. (There's some weird interaction with the scheduler as well, more investigation needed.)

My near term plan is to land this patch off-by-default, experiment in my local tree to identify any correctness issues and then start fixing codegen problems one by one as I find them. Once I have the live-in lowering fully working (both correctness and code quality), I'm hoping to move on to the live-on-return semantics. Note: I don't have any *known* miscompiles with this patch enabled, but I'm pretty sure I'll find at least a couple. Thus, the "experimental" tag and the fact it's off by default.

Differential Revision: https://reviews.llvm.org/D24000

llvm-svn: 280250
2016-08-31 15:12:17 +00:00
..
base-pointers-1.ll [RS4GC] Clamp UseDeoptBundles to true and update tests 2016-01-29 00:28:57 +00:00
base-pointers-2.ll [RS4GC] Clamp UseDeoptBundles to true and update tests 2016-01-29 00:28:57 +00:00
base-pointers-3.ll [RS4GC] Clamp UseDeoptBundles to true and update tests 2016-01-29 00:28:57 +00:00
base-pointers-4.ll [RS4GC] Revert optimization attempt due to memory corruption 2016-02-22 20:45:56 +00:00
base-pointers-5.ll [RS4GC] Clamp UseDeoptBundles to true and update tests 2016-01-29 00:28:57 +00:00
base-pointers-6.ll [RS4GC] Clamp UseDeoptBundles to true and update tests 2016-01-29 00:28:57 +00:00
base-pointers-7.ll [RS4GC] Clamp UseDeoptBundles to true and update tests 2016-01-29 00:28:57 +00:00
base-pointers-8.ll [RS4GC] Clamp UseDeoptBundles to true and update tests 2016-01-29 00:28:57 +00:00
base-pointers-9.ll [RS4GC] Clamp UseDeoptBundles to true and update tests 2016-01-29 00:28:57 +00:00
base-pointers-10.ll [RS4GC] Clamp UseDeoptBundles to true and update tests 2016-01-29 00:28:57 +00:00
base-pointers-11.ll [RS4GC] Clamp UseDeoptBundles to true and update tests 2016-01-29 00:28:57 +00:00
base-pointers-12.ll [RewriteStatepointsForGC] All constant should have null base pointer 2016-05-27 13:13:59 +00:00
base-pointers-13.ll [RewriteStatepointsForGC] All constant should have null base pointer 2016-05-27 13:13:59 +00:00
base-pointers.ll [RS4GC] Revert optimization attempt due to memory corruption 2016-02-22 20:45:56 +00:00
base-vector.ll [RewriteStatepointsForGC] All constant should have null base pointer 2016-05-27 13:13:59 +00:00
basic.ll [RS4GC] Clamp UseDeoptBundles to true and update tests 2016-01-29 00:28:57 +00:00
basics.ll [RS4GC] Use SetVector/MapVector instead of DenseSet/DenseMap to guarantee stable ordering 2016-05-04 14:55:36 +00:00
call-gc-result.ll [RS4GC] Clamp UseDeoptBundles to true and update tests 2016-01-29 00:28:57 +00:00
codegen-cond.ll [RS4GC] Clamp UseDeoptBundles to true and update tests 2016-01-29 00:28:57 +00:00
constants.ll [RewriteStatepointsForGC] All constant should have null base pointer 2016-05-27 13:13:59 +00:00
deopt-intrinsic-cconv.ll All llvm.deoptimize declarations must use the same calling convention 2016-05-12 01:17:38 +00:00
deopt-intrinsic.ll All llvm.deoptimize declarations must use the same calling convention 2016-05-12 01:17:38 +00:00
deopt-lowering-attrs.ll [statepoints][experimental] Add support for live-in semantics of values in deopt bundles 2016-08-31 15:12:17 +00:00
deref-pointers.ll [RS4GC] Clamp UseDeoptBundles to true and update tests 2016-01-29 00:28:57 +00:00
gc-relocate-creation.ll [RS4GC] Remove unnecessary redirections from tests; NFC 2016-01-29 16:32:30 +00:00
invokes.ll [RS4GC] Clamp UseDeoptBundles to true and update tests 2016-01-29 00:28:57 +00:00
leaf-function.ll [RS4GC] Clamp UseDeoptBundles to true and update tests 2016-01-29 00:28:57 +00:00
live-vector-nosplit.ll [RS4GC] "Constant fold" the rs4gc-split-vector-values flag 2016-02-22 21:01:28 +00:00
liveness-basics.ll [RS4GC] Clamp UseDeoptBundles to true and update tests 2016-01-29 00:28:57 +00:00
patchable-statepoints.ll [RS4GC] Clamp UseDeoptBundles to true and update tests 2016-01-29 00:28:57 +00:00
preprocess.ll [RS4GC] Clamp UseDeoptBundles to true and update tests 2016-01-29 00:28:57 +00:00
relocate-invoke-result.ll [RS4GC] Clamp UseDeoptBundles to true and update tests 2016-01-29 00:28:57 +00:00
relocation.ll [RS4GC] Remove unnecessary redirections from tests; NFC 2016-01-29 16:32:30 +00:00
rematerialize-derived-pointers.ll [StatepointsForGC] Rematerialize in the presence of PHIs 2016-08-29 15:41:59 +00:00
rewrite-invoke.ll [RS4GC] Clamp UseDeoptBundles to true and update tests 2016-01-29 00:28:57 +00:00
statepoint-calling-conventions.ll [RS4GC] Clamp UseDeoptBundles to true and update tests 2016-01-29 00:28:57 +00:00
statepoint-coreclr.ll [RS4GC] Clamp UseDeoptBundles to true and update tests 2016-01-29 00:28:57 +00:00
statepoint-format.ll [RS4GC] Use SetVector/MapVector instead of DenseSet/DenseMap to guarantee stable ordering 2016-05-04 14:55:36 +00:00
two-invokes-one-landingpad.ll [RS4GC] Clamp UseDeoptBundles to true and update tests 2016-01-29 00:28:57 +00:00