[PATCH] [Polly][RTC] Use the domain to split alias groups.
Johannes Doerfert
doerfert at cs.uni-saarland.de
Wed Oct 1 05:50:55 PDT 2014
================
Comment at: test/ScopInfo/aliasing_conditional_alias_groups_2.ll:6
@@ +5,3 @@
+;
+; CHECK: Alias Groups (2):
+;
----------------
grosser wrote:
> Before this change we got:
>
> %tmp38 = icmp ne i32 %b, 0
> %tmp39 = select i1 %tmp38, i64 6, i64 1024
> %polly.access.B = getelementptr i32* %B, i64 %tmp39
> %tmp40 = select i1 %tmp38, i64 0, i64 7
> %polly.access.A = getelementptr i32* %A, i64 %tmp40
> %tmp41 = icmp ule i32* %polly.access.B, %polly.access.A
> %tmp42 = select i1 %tmp38, i64 1024, i64 8
> %polly.access.A1 = getelementptr i32* %A, i64 %tmp42
> %tmp43 = select i1 %tmp38, i64 5, i64 0
> %polly.access.B2 = getelementptr i32* %B, i64 %tmp43
> %tmp44 = icmp ule i32* %polly.access.A1, %polly.access.B2
> %tmp45 = or i1 %tmp41, %tmp44
>
> 12 instructions
>
> after this change we got:
>
> %polly.access.A = getelementptr i32* %A, i64 8
> %tmp42 = icmp ule i32* %polly.access.A, %B
> %polly.access.B1 = getelementptr i32* %B, i64 1024
> %polly.access.A2 = getelementptr i32* %A, i64 7
> %tmp43 = icmp ule i32* %polly.access.B1, %polly.access.A2
> %tmp44 = or i1 %tmp42, %tmp43
> %polly.access.A3 = getelementptr i32* %A, i64 1024
> %polly.access.B4 = getelementptr i32* %B, i64 5
> %tmp45 = icmp ule i32* %polly.access.A3, %polly.access.B4
> %polly.access.B5 = getelementptr i32* %B, i64 6
> %tmp46 = icmp ule i32* %polly.access.B5, %A
> %tmp47 = or i1 %tmp45, %tmp46
> %tmp48 = and i1 %tmp44, %tmp47
>
> 13 instructions
>
> This does not seem to be a clear improvement (in this case rather a small regression at least in terms of instruction count).
But it's more precise ;)
Just look at the alias groups we generate, two small precise ones instead of one overaproximated one :)
http://reviews.llvm.org/D5436
More information about the llvm-commits
mailing list