diff options
author | Jingyue Wu <jingyue@google.com> | 2015-05-29 17:00:27 +0000 |
---|---|---|
committer | Jingyue Wu <jingyue@google.com> | 2015-05-29 17:00:27 +0000 |
commit | 995dde27995e3f957966fd52d721d65d60bda43b (patch) | |
tree | 07a44f22f2948de96cd0013a08b6a9382661923f /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | a84feb17274882ad0830f5dc538307942db155ab (diff) | |
download | llvm-995dde27995e3f957966fd52d721d65d60bda43b.zip llvm-995dde27995e3f957966fd52d721d65d60bda43b.tar.gz llvm-995dde27995e3f957966fd52d721d65d60bda43b.tar.bz2 |
[NVPTXFavorNonGenericAddrSpaces] recursively trace into GEP and BitCast
Summary:
This patch allows NVPTXFavorNonGenericAddrSpaces to remove addrspacecast
from longer chains consisting of GEPs and BitCasts. For example, it can
now optimize
%0 = addrspacecast [10 x float] addrspace(3)* @a to [10 x float]*
%1 = gep [10 x float]* %0, i64 0, i64 %i
%2 = bitcast float* %1 to i32*
%3 = load i32* %2 ; emits ld.u32
to
%0 = gep [10 x float] addrspace(3)* @a, i64 0, i64 %i
%1 = bitcast float addrspace(3)* %0 to i32 addrspace(3)*
%3 = load i32 addrspace(3)* %1 ; emits ld.shared.f32
Test Plan: @ld_int_from_global_float in access-non-generic.ll
Reviewers: broune, eliben, jholewinski, meheff
Subscribers: jholewinski, llvm-commits
Differential Revision: http://reviews.llvm.org/D10074
llvm-svn: 238574
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions