diff options
author | Chris Lattner <sabre@nondot.org> | 2010-01-03 03:03:27 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-01-03 03:03:27 +0000 |
commit | fca0c8f93a15aa7b33cd5231e762cd184d7e3ef2 (patch) | |
tree | 4716dca91a0e6f4f2d7a9ca0c924deb03c0210a9 /clang/lib/Sema/SemaLookup.cpp | |
parent | c6f59b1c491d4d6a91ce8f17e96b5cd99fd3183f (diff) | |
download | bcm5719-llvm-fca0c8f93a15aa7b33cd5231e762cd184d7e3ef2.tar.gz bcm5719-llvm-fca0c8f93a15aa7b33cd5231e762cd184d7e3ef2.zip |
generalize the previous transformation to handle indexing into
arrays of structs and other arrays, so long as all the subsequent
indexes are constants. This triggers frequently for stuff like:
@divisions = internal constant [29 x [2 x i32]] [[2 x i32] zeroinitializer, [2 x i32] [i32 0, i32 1], [2 x i32] [i32 0, i32 2], [2 x i32] [i32 0, i32 1], [2 x i32] zeroinitializer, [2 x i32] [i32 0, i32 1], [2 x i32] [i32 0, i32 1], [2 x i32] [i32 0, i32 2], [2 x i32] [i32 0, i32 2], [2 x i32] zeroinitializer, [2 x i32] zeroinitializer, [2 x i32] zeroinitializer, [2 x i32] [i32 0, i32 2], [2 x i32] [i32 0, i32 1], [2 x i32] zeroinitializer, [2 x i32] [i32 1, i32 0], [2 x i32] [i32 1, i32 1], [2 x i32] [i32 1, i32 1], [2 x i32] [i32 1, i32 2], [2 x i32] [i32 1, i32 1], [2 x i32] [i32 1, i32 0], [2 x i32] [i32 1, i32 2], [2 x i32] [i32 1, i32 2], [2 x i32] [i32 1, i32 0], [2 x i32] [i32 1, i32 0], [2 x i32] [i32 1, i32 0], [2 x i32] [i32 1, i32 1], [2 x i32] [i32 1, i32 2], [2 x i32] [i32 1, i32 2]], align 32 ; <[29 x [2 x i32]]*> [#uses=50]
%623 = getelementptr inbounds [29 x [2 x i32]]* @divisions, i64 0, i64 %619, i64 0 ; <i32*> [#uses=1]
%684 = icmp eq i32 %683, 999
also for the "my_defs" table in 'gs', etc.
llvm-svn: 92444
Diffstat (limited to 'clang/lib/Sema/SemaLookup.cpp')
0 files changed, 0 insertions, 0 deletions