diff options
| author | Igor Laevsky <igmyrj@gmail.com> | 2016-05-27 13:13:59 +0000 |
|---|---|---|
| committer | Igor Laevsky <igmyrj@gmail.com> | 2016-05-27 13:13:59 +0000 |
| commit | df9db45c944a7f21cf4483a1c1b8dd1eaead2f47 (patch) | |
| tree | c76c8245ca6680d8a1740b7bd721bc4825ffb44b /llvm/test/Transforms/RewriteStatepointsForGC/base-vector.ll | |
| parent | 7951fbf1a8f3057cf9ebf52e2ee39bac6a54e368 (diff) | |
| download | bcm5719-llvm-df9db45c944a7f21cf4483a1c1b8dd1eaead2f47.tar.gz bcm5719-llvm-df9db45c944a7f21cf4483a1c1b8dd1eaead2f47.zip | |
[RewriteStatepointsForGC] All constant should have null base pointer
Currently we consider that each constant has itself as a base value. I.e "base(const) = const".
This introduces couple of problems when we are trying to avoid reporting constants in statepoint live sets:
1. When querying "base( phi(const1, const2) )" we will get "phi(const1, const2)" as a base pointer. Since
it's not a constant we will record it in a stack map. However on practice we don't want this to happen
(constant are never relocated).
2. base( phi(const, gc ptr) ) = phi( const, base(gc ptr) ). This particular case imposes challenge on our
runtime - we don't expect to see constant base pointers other than null. This problems can be avoided
by treating all constant as if they were derived from null pointer base. I.e in a first case we will
not include constant pointer in a stack map at all. In a second case we will get "phi(null, base(gc ptr))"
as a base pointer which is a lot more convenient.
Differential Revision: http://reviews.llvm.org/D20584
llvm-svn: 270993
Diffstat (limited to 'llvm/test/Transforms/RewriteStatepointsForGC/base-vector.ll')
| -rw-r--r-- | llvm/test/Transforms/RewriteStatepointsForGC/base-vector.ll | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/test/Transforms/RewriteStatepointsForGC/base-vector.ll b/llvm/test/Transforms/RewriteStatepointsForGC/base-vector.ll index 3f507c0a77c..39a78d72597 100644 --- a/llvm/test/Transforms/RewriteStatepointsForGC/base-vector.ll +++ b/llvm/test/Transforms/RewriteStatepointsForGC/base-vector.ll @@ -106,7 +106,7 @@ entry: define void @test6(i1 %cnd, i64 addrspace(1)* %obj, i64 %idx) gc "statepoint-example" { ; CHECK-LABEL: @test6 ; CHECK: %gep = getelementptr i64, i64 addrspace(1)* %obj, i64 1 -; CHECK: %vec.base = insertelement <2 x i64 addrspace(1)*> undef, i64 addrspace(1)* %obj, i32 0, !is_base_value !0 +; CHECK: %vec.base = insertelement <2 x i64 addrspace(1)*> zeroinitializer, i64 addrspace(1)* %obj, i32 0, !is_base_value !0 ; CHECK: %vec = insertelement <2 x i64 addrspace(1)*> undef, i64 addrspace(1)* %gep, i32 0 ; CHECK: %bdv.base = extractelement <2 x i64 addrspace(1)*> %vec.base, i64 %idx, !is_base_value !0 ; CHECK: %bdv = extractelement <2 x i64 addrspace(1)*> %vec, i64 %idx |

