[polly] r219275 - [Fix] Ignore forwarding alias sets in the alias set tracker.
Tobias Grosser
tobias at grosser.es
Wed Oct 8 04:12:35 PDT 2014
On 08/10/2014 04:23, Johannes Doerfert wrote:
> Author: jdoerfert
> Date: Tue Oct 7 21:23:48 2014
> New Revision: 219275
>
> URL: http://llvm.org/viewvc/llvm-project?rev=219275&view=rev
> Log:
> [Fix] Ignore forwarding alias sets in the alias set tracker.
>
> Modified:
> polly/trunk/lib/Analysis/ScopInfo.cpp
>
> Modified: polly/trunk/lib/Analysis/ScopInfo.cpp
> URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopInfo.cpp?rev=219275&r1=219274&r2=219275&view=diff
> ==============================================================================
> --- polly/trunk/lib/Analysis/ScopInfo.cpp (original)
> +++ polly/trunk/lib/Analysis/ScopInfo.cpp Tue Oct 7 21:23:48 2014
> @@ -1294,7 +1294,7 @@ bool Scop::buildAliasGroups(AliasAnalysi
>
> SmallVector<AliasGroupTy, 4> AliasGroups;
> for (AliasSet &AS : AST) {
> - if (AS.isMustAlias())
> + if (AS.isMustAlias() || AS.isForwardingAliasSet())
> continue;
> AliasGroupTy AG;
> for (auto PR : AS)
This change unbroke the asserts on our build bots. This is nice!
Could you explain me what forwarding alias sets are and why they are
safe to ignore? Specifically, why do we know that they will not contain
any pointers (except the forward reference).
I was quickly browsing the alias set tracker code, but I did not find
the corresponding documentation.
Also, was there a reason you did not commit a test case? I attached you
the one I used, in case you did not manage to reduce one.
Cheers,
Tobias
-------------- next part --------------
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
@A = external global [4 x i32], align 16
define void @dct_luma_16x16() {
entry:
br label %for.0
for.0:
%indvar.i.0 = phi i64 [ 0, %entry ], [ %indvar.i.0.next, %for.0 ]
%gep.0 = getelementptr [4 x i32]* @A, i64 %indvar.i.0, i64 1
store i32 0, i32* %gep.0
%indvar.i.0.next = add i64 %indvar.i.0, 1
%exitcond126 = icmp eq i64 %indvar.i.0.next, 4
br i1 %exitcond126, label %for.1.preheader, label %for.0
for.1.preheader:
br label %for.1
for.1:
%indvar.i.1 = phi i64 [ %indvar.i.1.next, %for.1 ], [ 0, %for.1.preheader ]
%gep.1= getelementptr [4 x i32]* @A, i64 0, i64 %indvar.i.1
store i32 1, i32* %gep.1
%indvar.i.1.next = add i64 %indvar.i.1, 1
%exitcond135 = icmp eq i64 %indvar.i.1.next, 4
br i1 %exitcond135, label %for.2.preheader, label %for.1
for.2.preheader:
br label %for.2
for.2:
%indvar.i.2 = phi i64 [ 0, %for.2.preheader ], [ %indvar.i.2.next, %for.2 ]
%gep.2 = getelementptr [4 x i32]* @A, i64 0, i64 %indvar.i.2
store i32 2, i32* %gep.2
%indvar.i.2.next = add i64 %indvar.i.2, 1
%exitcond120 = icmp eq i64 %indvar.i.2.next, 4
br i1 %exitcond120, label %for.3.preheader, label %for.2
for.3.preheader:
br label %for.3
for.3:
%indvar.i.3 = phi i64 [ %indvar.i.3.next, %for.3 ], [ 0, %for.3.preheader ]
%gep.3 = getelementptr [4 x i32]* @A, i64 %indvar.i.3, i64 1
store i32 3, i32* %gep.3
%indvar.i.3.next = add i64 %indvar.i.3, 1
%exitcond115 = icmp eq i64 %indvar.i.3.next, 4
br i1 %exitcond115, label %for.4.preheader, label %for.3
for.4.preheader:
br label %for.4
for.4:
%indvar.i.4 = phi i64 [ %indvar.i.4.next, %for.4 ], [ 0, %for.4.preheader ]
%gep.4 = getelementptr [4 x i32]* @A, i64 2, i64 %indvar.i.4
store i32 4, i32* %gep.4
%indvar.i.4.next = add i64 %indvar.i.4, 1
%exitcond108 = icmp eq i64 %indvar.i.4.next, 4
br i1 %exitcond108, label %exit, label %for.4
exit:
ret void
}
More information about the llvm-commits
mailing list