dependence analysis
Patch from Preston Briggs <preston.briggs@gmail.com>.
This is an updated version of the dependence-analysis patch, including an MIV
test based on Banerjee's inequalities.
It's a fairly complete implementation of the paper
Practical Dependence Testing
Gina Goff, Ken Kennedy, and Chau-Wen Tseng
PLDI 1991
It cannot yet propagate constraints between coupled RDIV subscripts (discussed
in Section 5.3.2 of the paper).
It's organized as a FunctionPass with a single entry point that supports testing
for dependence between two instructions in a function. If there's no dependence,
it returns null. If there's a dependence, it returns a pointer to a Dependence
which can be queried about details (what kind of dependence, is it loop
independent, direction and distance vector entries, etc). I haven't included
every imaginable feature, but there's a good selection that should be adequate
for supporting many loop transformations. Of course, it can be extended as
necessary.
Included in the patch file are many test cases, commented with C code showing
the loops and array references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165708 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-11 07:32:34 +00:00
|
|
|
; RUN: opt < %s -analyze -basicaa -da | FileCheck %s
|
|
|
|
|
|
|
|
; ModuleID = 'SymbolicSIV.bc'
|
|
|
|
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
|
|
|
|
target triple = "x86_64-apple-macosx10.6.0"
|
|
|
|
|
|
|
|
|
2012-11-13 12:12:02 +00:00
|
|
|
;; for (long int i = 0; i < n; i++) {
|
|
|
|
;; A[2*i + n] = i;
|
|
|
|
;; *B++ = A[3*i + 3*n];
|
dependence analysis
Patch from Preston Briggs <preston.briggs@gmail.com>.
This is an updated version of the dependence-analysis patch, including an MIV
test based on Banerjee's inequalities.
It's a fairly complete implementation of the paper
Practical Dependence Testing
Gina Goff, Ken Kennedy, and Chau-Wen Tseng
PLDI 1991
It cannot yet propagate constraints between coupled RDIV subscripts (discussed
in Section 5.3.2 of the paper).
It's organized as a FunctionPass with a single entry point that supports testing
for dependence between two instructions in a function. If there's no dependence,
it returns null. If there's a dependence, it returns a pointer to a Dependence
which can be queried about details (what kind of dependence, is it loop
independent, direction and distance vector entries, etc). I haven't included
every imaginable feature, but there's a good selection that should be adequate
for supporting many loop transformations. Of course, it can be extended as
necessary.
Included in the patch file are many test cases, commented with C code showing
the loops and array references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165708 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-11 07:32:34 +00:00
|
|
|
|
|
|
|
define void @symbolicsiv0(i32* %A, i32* %B, i64 %n) nounwind uwtable ssp {
|
|
|
|
entry:
|
|
|
|
%cmp1 = icmp eq i64 %n, 0
|
2012-11-13 12:12:02 +00:00
|
|
|
br i1 %cmp1, label %for.end, label %for.body.preheader
|
|
|
|
|
2012-11-27 19:12:26 +00:00
|
|
|
; CHECK: da analyze - none!
|
2012-11-13 12:12:02 +00:00
|
|
|
; CHECK: da analyze - none!
|
|
|
|
; CHECK: da analyze - confused!
|
2012-11-27 19:12:26 +00:00
|
|
|
; CHECK: da analyze - none!
|
2012-11-13 12:12:02 +00:00
|
|
|
; CHECK: da analyze - confused!
|
2012-11-27 19:12:26 +00:00
|
|
|
; CHECK: da analyze - none!
|
2012-11-13 12:12:02 +00:00
|
|
|
|
|
|
|
for.body.preheader: ; preds = %entry
|
|
|
|
br label %for.body
|
dependence analysis
Patch from Preston Briggs <preston.briggs@gmail.com>.
This is an updated version of the dependence-analysis patch, including an MIV
test based on Banerjee's inequalities.
It's a fairly complete implementation of the paper
Practical Dependence Testing
Gina Goff, Ken Kennedy, and Chau-Wen Tseng
PLDI 1991
It cannot yet propagate constraints between coupled RDIV subscripts (discussed
in Section 5.3.2 of the paper).
It's organized as a FunctionPass with a single entry point that supports testing
for dependence between two instructions in a function. If there's no dependence,
it returns null. If there's a dependence, it returns a pointer to a Dependence
which can be queried about details (what kind of dependence, is it loop
independent, direction and distance vector entries, etc). I haven't included
every imaginable feature, but there's a good selection that should be adequate
for supporting many loop transformations. Of course, it can be extended as
necessary.
Included in the patch file are many test cases, commented with C code showing
the loops and array references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165708 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-11 07:32:34 +00:00
|
|
|
|
2012-11-13 12:12:02 +00:00
|
|
|
for.body: ; preds = %for.body.preheader, %for.body
|
|
|
|
%i.03 = phi i64 [ %inc, %for.body ], [ 0, %for.body.preheader ]
|
|
|
|
%B.addr.02 = phi i32* [ %incdec.ptr, %for.body ], [ %B, %for.body.preheader ]
|
dependence analysis
Patch from Preston Briggs <preston.briggs@gmail.com>.
This is an updated version of the dependence-analysis patch, including an MIV
test based on Banerjee's inequalities.
It's a fairly complete implementation of the paper
Practical Dependence Testing
Gina Goff, Ken Kennedy, and Chau-Wen Tseng
PLDI 1991
It cannot yet propagate constraints between coupled RDIV subscripts (discussed
in Section 5.3.2 of the paper).
It's organized as a FunctionPass with a single entry point that supports testing
for dependence between two instructions in a function. If there's no dependence,
it returns null. If there's a dependence, it returns a pointer to a Dependence
which can be queried about details (what kind of dependence, is it loop
independent, direction and distance vector entries, etc). I haven't included
every imaginable feature, but there's a good selection that should be adequate
for supporting many loop transformations. Of course, it can be extended as
necessary.
Included in the patch file are many test cases, commented with C code showing
the loops and array references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165708 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-11 07:32:34 +00:00
|
|
|
%conv = trunc i64 %i.03 to i32
|
|
|
|
%mul = shl nsw i64 %i.03, 1
|
|
|
|
%add = add i64 %mul, %n
|
|
|
|
%arrayidx = getelementptr inbounds i32* %A, i64 %add
|
|
|
|
store i32 %conv, i32* %arrayidx, align 4
|
|
|
|
%mul14 = add i64 %i.03, %n
|
|
|
|
%add3 = mul i64 %mul14, 3
|
|
|
|
%arrayidx4 = getelementptr inbounds i32* %A, i64 %add3
|
|
|
|
%0 = load i32* %arrayidx4, align 4
|
|
|
|
%incdec.ptr = getelementptr inbounds i32* %B.addr.02, i64 1
|
|
|
|
store i32 %0, i32* %B.addr.02, align 4
|
|
|
|
%inc = add nsw i64 %i.03, 1
|
2012-11-13 12:12:02 +00:00
|
|
|
%exitcond = icmp ne i64 %inc, %n
|
|
|
|
br i1 %exitcond, label %for.body, label %for.end.loopexit
|
|
|
|
|
|
|
|
for.end.loopexit: ; preds = %for.body
|
|
|
|
br label %for.end
|
dependence analysis
Patch from Preston Briggs <preston.briggs@gmail.com>.
This is an updated version of the dependence-analysis patch, including an MIV
test based on Banerjee's inequalities.
It's a fairly complete implementation of the paper
Practical Dependence Testing
Gina Goff, Ken Kennedy, and Chau-Wen Tseng
PLDI 1991
It cannot yet propagate constraints between coupled RDIV subscripts (discussed
in Section 5.3.2 of the paper).
It's organized as a FunctionPass with a single entry point that supports testing
for dependence between two instructions in a function. If there's no dependence,
it returns null. If there's a dependence, it returns a pointer to a Dependence
which can be queried about details (what kind of dependence, is it loop
independent, direction and distance vector entries, etc). I haven't included
every imaginable feature, but there's a good selection that should be adequate
for supporting many loop transformations. Of course, it can be extended as
necessary.
Included in the patch file are many test cases, commented with C code showing
the loops and array references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165708 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-11 07:32:34 +00:00
|
|
|
|
2012-11-13 12:12:02 +00:00
|
|
|
for.end: ; preds = %for.end.loopexit, %entry
|
dependence analysis
Patch from Preston Briggs <preston.briggs@gmail.com>.
This is an updated version of the dependence-analysis patch, including an MIV
test based on Banerjee's inequalities.
It's a fairly complete implementation of the paper
Practical Dependence Testing
Gina Goff, Ken Kennedy, and Chau-Wen Tseng
PLDI 1991
It cannot yet propagate constraints between coupled RDIV subscripts (discussed
in Section 5.3.2 of the paper).
It's organized as a FunctionPass with a single entry point that supports testing
for dependence between two instructions in a function. If there's no dependence,
it returns null. If there's a dependence, it returns a pointer to a Dependence
which can be queried about details (what kind of dependence, is it loop
independent, direction and distance vector entries, etc). I haven't included
every imaginable feature, but there's a good selection that should be adequate
for supporting many loop transformations. Of course, it can be extended as
necessary.
Included in the patch file are many test cases, commented with C code showing
the loops and array references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165708 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-11 07:32:34 +00:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2012-11-13 12:12:02 +00:00
|
|
|
;; for (long int i = 0; i < n; i++) {
|
|
|
|
;; A[2*i + 5*n] = i;
|
|
|
|
;; *B++ = A[3*i + 2*n];
|
dependence analysis
Patch from Preston Briggs <preston.briggs@gmail.com>.
This is an updated version of the dependence-analysis patch, including an MIV
test based on Banerjee's inequalities.
It's a fairly complete implementation of the paper
Practical Dependence Testing
Gina Goff, Ken Kennedy, and Chau-Wen Tseng
PLDI 1991
It cannot yet propagate constraints between coupled RDIV subscripts (discussed
in Section 5.3.2 of the paper).
It's organized as a FunctionPass with a single entry point that supports testing
for dependence between two instructions in a function. If there's no dependence,
it returns null. If there's a dependence, it returns a pointer to a Dependence
which can be queried about details (what kind of dependence, is it loop
independent, direction and distance vector entries, etc). I haven't included
every imaginable feature, but there's a good selection that should be adequate
for supporting many loop transformations. Of course, it can be extended as
necessary.
Included in the patch file are many test cases, commented with C code showing
the loops and array references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165708 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-11 07:32:34 +00:00
|
|
|
|
|
|
|
define void @symbolicsiv1(i32* %A, i32* %B, i64 %n) nounwind uwtable ssp {
|
|
|
|
entry:
|
|
|
|
%cmp1 = icmp eq i64 %n, 0
|
2012-11-13 12:12:02 +00:00
|
|
|
br i1 %cmp1, label %for.end, label %for.body.preheader
|
|
|
|
|
2012-11-27 19:12:26 +00:00
|
|
|
; CHECK: da analyze - none!
|
2012-11-13 12:12:02 +00:00
|
|
|
; CHECK: da analyze - none!
|
|
|
|
; CHECK: da analyze - confused!
|
2012-11-27 19:12:26 +00:00
|
|
|
; CHECK: da analyze - none!
|
2012-11-13 12:12:02 +00:00
|
|
|
; CHECK: da analyze - confused!
|
2012-11-27 19:12:26 +00:00
|
|
|
; CHECK: da analyze - none!
|
dependence analysis
Patch from Preston Briggs <preston.briggs@gmail.com>.
This is an updated version of the dependence-analysis patch, including an MIV
test based on Banerjee's inequalities.
It's a fairly complete implementation of the paper
Practical Dependence Testing
Gina Goff, Ken Kennedy, and Chau-Wen Tseng
PLDI 1991
It cannot yet propagate constraints between coupled RDIV subscripts (discussed
in Section 5.3.2 of the paper).
It's organized as a FunctionPass with a single entry point that supports testing
for dependence between two instructions in a function. If there's no dependence,
it returns null. If there's a dependence, it returns a pointer to a Dependence
which can be queried about details (what kind of dependence, is it loop
independent, direction and distance vector entries, etc). I haven't included
every imaginable feature, but there's a good selection that should be adequate
for supporting many loop transformations. Of course, it can be extended as
necessary.
Included in the patch file are many test cases, commented with C code showing
the loops and array references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165708 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-11 07:32:34 +00:00
|
|
|
|
2012-11-13 12:12:02 +00:00
|
|
|
for.body.preheader: ; preds = %entry
|
|
|
|
br label %for.body
|
|
|
|
|
|
|
|
for.body: ; preds = %for.body.preheader, %for.body
|
|
|
|
%i.03 = phi i64 [ %inc, %for.body ], [ 0, %for.body.preheader ]
|
|
|
|
%B.addr.02 = phi i32* [ %incdec.ptr, %for.body ], [ %B, %for.body.preheader ]
|
dependence analysis
Patch from Preston Briggs <preston.briggs@gmail.com>.
This is an updated version of the dependence-analysis patch, including an MIV
test based on Banerjee's inequalities.
It's a fairly complete implementation of the paper
Practical Dependence Testing
Gina Goff, Ken Kennedy, and Chau-Wen Tseng
PLDI 1991
It cannot yet propagate constraints between coupled RDIV subscripts (discussed
in Section 5.3.2 of the paper).
It's organized as a FunctionPass with a single entry point that supports testing
for dependence between two instructions in a function. If there's no dependence,
it returns null. If there's a dependence, it returns a pointer to a Dependence
which can be queried about details (what kind of dependence, is it loop
independent, direction and distance vector entries, etc). I haven't included
every imaginable feature, but there's a good selection that should be adequate
for supporting many loop transformations. Of course, it can be extended as
necessary.
Included in the patch file are many test cases, commented with C code showing
the loops and array references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165708 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-11 07:32:34 +00:00
|
|
|
%conv = trunc i64 %i.03 to i32
|
|
|
|
%mul = shl nsw i64 %i.03, 1
|
|
|
|
%mul1 = mul i64 %n, 5
|
|
|
|
%add = add i64 %mul, %mul1
|
|
|
|
%arrayidx = getelementptr inbounds i32* %A, i64 %add
|
|
|
|
store i32 %conv, i32* %arrayidx, align 4
|
|
|
|
%mul2 = mul nsw i64 %i.03, 3
|
|
|
|
%mul3 = shl i64 %n, 1
|
|
|
|
%add4 = add i64 %mul2, %mul3
|
|
|
|
%arrayidx5 = getelementptr inbounds i32* %A, i64 %add4
|
|
|
|
%0 = load i32* %arrayidx5, align 4
|
|
|
|
%incdec.ptr = getelementptr inbounds i32* %B.addr.02, i64 1
|
|
|
|
store i32 %0, i32* %B.addr.02, align 4
|
|
|
|
%inc = add nsw i64 %i.03, 1
|
2012-11-13 12:12:02 +00:00
|
|
|
%exitcond = icmp ne i64 %inc, %n
|
|
|
|
br i1 %exitcond, label %for.body, label %for.end.loopexit
|
|
|
|
|
|
|
|
for.end.loopexit: ; preds = %for.body
|
|
|
|
br label %for.end
|
dependence analysis
Patch from Preston Briggs <preston.briggs@gmail.com>.
This is an updated version of the dependence-analysis patch, including an MIV
test based on Banerjee's inequalities.
It's a fairly complete implementation of the paper
Practical Dependence Testing
Gina Goff, Ken Kennedy, and Chau-Wen Tseng
PLDI 1991
It cannot yet propagate constraints between coupled RDIV subscripts (discussed
in Section 5.3.2 of the paper).
It's organized as a FunctionPass with a single entry point that supports testing
for dependence between two instructions in a function. If there's no dependence,
it returns null. If there's a dependence, it returns a pointer to a Dependence
which can be queried about details (what kind of dependence, is it loop
independent, direction and distance vector entries, etc). I haven't included
every imaginable feature, but there's a good selection that should be adequate
for supporting many loop transformations. Of course, it can be extended as
necessary.
Included in the patch file are many test cases, commented with C code showing
the loops and array references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165708 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-11 07:32:34 +00:00
|
|
|
|
2012-11-13 12:12:02 +00:00
|
|
|
for.end: ; preds = %for.end.loopexit, %entry
|
dependence analysis
Patch from Preston Briggs <preston.briggs@gmail.com>.
This is an updated version of the dependence-analysis patch, including an MIV
test based on Banerjee's inequalities.
It's a fairly complete implementation of the paper
Practical Dependence Testing
Gina Goff, Ken Kennedy, and Chau-Wen Tseng
PLDI 1991
It cannot yet propagate constraints between coupled RDIV subscripts (discussed
in Section 5.3.2 of the paper).
It's organized as a FunctionPass with a single entry point that supports testing
for dependence between two instructions in a function. If there's no dependence,
it returns null. If there's a dependence, it returns a pointer to a Dependence
which can be queried about details (what kind of dependence, is it loop
independent, direction and distance vector entries, etc). I haven't included
every imaginable feature, but there's a good selection that should be adequate
for supporting many loop transformations. Of course, it can be extended as
necessary.
Included in the patch file are many test cases, commented with C code showing
the loops and array references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165708 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-11 07:32:34 +00:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2012-11-13 12:12:02 +00:00
|
|
|
;; for (long int i = 0; i < n; i++) {
|
|
|
|
;; A[2*i - n] = i;
|
|
|
|
;; *B++ = A[-i + 2*n];
|
dependence analysis
Patch from Preston Briggs <preston.briggs@gmail.com>.
This is an updated version of the dependence-analysis patch, including an MIV
test based on Banerjee's inequalities.
It's a fairly complete implementation of the paper
Practical Dependence Testing
Gina Goff, Ken Kennedy, and Chau-Wen Tseng
PLDI 1991
It cannot yet propagate constraints between coupled RDIV subscripts (discussed
in Section 5.3.2 of the paper).
It's organized as a FunctionPass with a single entry point that supports testing
for dependence between two instructions in a function. If there's no dependence,
it returns null. If there's a dependence, it returns a pointer to a Dependence
which can be queried about details (what kind of dependence, is it loop
independent, direction and distance vector entries, etc). I haven't included
every imaginable feature, but there's a good selection that should be adequate
for supporting many loop transformations. Of course, it can be extended as
necessary.
Included in the patch file are many test cases, commented with C code showing
the loops and array references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165708 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-11 07:32:34 +00:00
|
|
|
|
|
|
|
define void @symbolicsiv2(i32* %A, i32* %B, i64 %n) nounwind uwtable ssp {
|
|
|
|
entry:
|
|
|
|
%cmp1 = icmp eq i64 %n, 0
|
2012-11-13 12:12:02 +00:00
|
|
|
br i1 %cmp1, label %for.end, label %for.body.preheader
|
|
|
|
|
2012-11-27 19:12:26 +00:00
|
|
|
; CHECK: da analyze - none!
|
2012-11-13 12:12:02 +00:00
|
|
|
; CHECK: da analyze - none!
|
|
|
|
; CHECK: da analyze - confused!
|
2012-11-27 19:12:26 +00:00
|
|
|
; CHECK: da analyze - none!
|
2012-11-13 12:12:02 +00:00
|
|
|
; CHECK: da analyze - confused!
|
2012-11-27 19:12:26 +00:00
|
|
|
; CHECK: da analyze - none!
|
2012-11-13 12:12:02 +00:00
|
|
|
|
|
|
|
for.body.preheader: ; preds = %entry
|
|
|
|
br label %for.body
|
dependence analysis
Patch from Preston Briggs <preston.briggs@gmail.com>.
This is an updated version of the dependence-analysis patch, including an MIV
test based on Banerjee's inequalities.
It's a fairly complete implementation of the paper
Practical Dependence Testing
Gina Goff, Ken Kennedy, and Chau-Wen Tseng
PLDI 1991
It cannot yet propagate constraints between coupled RDIV subscripts (discussed
in Section 5.3.2 of the paper).
It's organized as a FunctionPass with a single entry point that supports testing
for dependence between two instructions in a function. If there's no dependence,
it returns null. If there's a dependence, it returns a pointer to a Dependence
which can be queried about details (what kind of dependence, is it loop
independent, direction and distance vector entries, etc). I haven't included
every imaginable feature, but there's a good selection that should be adequate
for supporting many loop transformations. Of course, it can be extended as
necessary.
Included in the patch file are many test cases, commented with C code showing
the loops and array references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165708 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-11 07:32:34 +00:00
|
|
|
|
2012-11-13 12:12:02 +00:00
|
|
|
for.body: ; preds = %for.body.preheader, %for.body
|
|
|
|
%i.03 = phi i64 [ %inc, %for.body ], [ 0, %for.body.preheader ]
|
|
|
|
%B.addr.02 = phi i32* [ %incdec.ptr, %for.body ], [ %B, %for.body.preheader ]
|
dependence analysis
Patch from Preston Briggs <preston.briggs@gmail.com>.
This is an updated version of the dependence-analysis patch, including an MIV
test based on Banerjee's inequalities.
It's a fairly complete implementation of the paper
Practical Dependence Testing
Gina Goff, Ken Kennedy, and Chau-Wen Tseng
PLDI 1991
It cannot yet propagate constraints between coupled RDIV subscripts (discussed
in Section 5.3.2 of the paper).
It's organized as a FunctionPass with a single entry point that supports testing
for dependence between two instructions in a function. If there's no dependence,
it returns null. If there's a dependence, it returns a pointer to a Dependence
which can be queried about details (what kind of dependence, is it loop
independent, direction and distance vector entries, etc). I haven't included
every imaginable feature, but there's a good selection that should be adequate
for supporting many loop transformations. Of course, it can be extended as
necessary.
Included in the patch file are many test cases, commented with C code showing
the loops and array references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165708 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-11 07:32:34 +00:00
|
|
|
%conv = trunc i64 %i.03 to i32
|
|
|
|
%mul = shl nsw i64 %i.03, 1
|
|
|
|
%sub = sub i64 %mul, %n
|
|
|
|
%arrayidx = getelementptr inbounds i32* %A, i64 %sub
|
|
|
|
store i32 %conv, i32* %arrayidx, align 4
|
|
|
|
%mul2 = shl i64 %n, 1
|
|
|
|
%add = sub i64 %mul2, %i.03
|
|
|
|
%arrayidx3 = getelementptr inbounds i32* %A, i64 %add
|
|
|
|
%0 = load i32* %arrayidx3, align 4
|
|
|
|
%incdec.ptr = getelementptr inbounds i32* %B.addr.02, i64 1
|
|
|
|
store i32 %0, i32* %B.addr.02, align 4
|
|
|
|
%inc = add nsw i64 %i.03, 1
|
2012-11-13 12:12:02 +00:00
|
|
|
%exitcond = icmp ne i64 %inc, %n
|
|
|
|
br i1 %exitcond, label %for.body, label %for.end.loopexit
|
|
|
|
|
|
|
|
for.end.loopexit: ; preds = %for.body
|
|
|
|
br label %for.end
|
dependence analysis
Patch from Preston Briggs <preston.briggs@gmail.com>.
This is an updated version of the dependence-analysis patch, including an MIV
test based on Banerjee's inequalities.
It's a fairly complete implementation of the paper
Practical Dependence Testing
Gina Goff, Ken Kennedy, and Chau-Wen Tseng
PLDI 1991
It cannot yet propagate constraints between coupled RDIV subscripts (discussed
in Section 5.3.2 of the paper).
It's organized as a FunctionPass with a single entry point that supports testing
for dependence between two instructions in a function. If there's no dependence,
it returns null. If there's a dependence, it returns a pointer to a Dependence
which can be queried about details (what kind of dependence, is it loop
independent, direction and distance vector entries, etc). I haven't included
every imaginable feature, but there's a good selection that should be adequate
for supporting many loop transformations. Of course, it can be extended as
necessary.
Included in the patch file are many test cases, commented with C code showing
the loops and array references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165708 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-11 07:32:34 +00:00
|
|
|
|
2012-11-13 12:12:02 +00:00
|
|
|
for.end: ; preds = %for.end.loopexit, %entry
|
dependence analysis
Patch from Preston Briggs <preston.briggs@gmail.com>.
This is an updated version of the dependence-analysis patch, including an MIV
test based on Banerjee's inequalities.
It's a fairly complete implementation of the paper
Practical Dependence Testing
Gina Goff, Ken Kennedy, and Chau-Wen Tseng
PLDI 1991
It cannot yet propagate constraints between coupled RDIV subscripts (discussed
in Section 5.3.2 of the paper).
It's organized as a FunctionPass with a single entry point that supports testing
for dependence between two instructions in a function. If there's no dependence,
it returns null. If there's a dependence, it returns a pointer to a Dependence
which can be queried about details (what kind of dependence, is it loop
independent, direction and distance vector entries, etc). I haven't included
every imaginable feature, but there's a good selection that should be adequate
for supporting many loop transformations. Of course, it can be extended as
necessary.
Included in the patch file are many test cases, commented with C code showing
the loops and array references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165708 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-11 07:32:34 +00:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2012-11-13 12:12:02 +00:00
|
|
|
;; for (long int i = 0; i < n; i++) {
|
|
|
|
;; A[-2*i + n + 1] = i;
|
|
|
|
;; *B++ = A[i - 2*n];
|
dependence analysis
Patch from Preston Briggs <preston.briggs@gmail.com>.
This is an updated version of the dependence-analysis patch, including an MIV
test based on Banerjee's inequalities.
It's a fairly complete implementation of the paper
Practical Dependence Testing
Gina Goff, Ken Kennedy, and Chau-Wen Tseng
PLDI 1991
It cannot yet propagate constraints between coupled RDIV subscripts (discussed
in Section 5.3.2 of the paper).
It's organized as a FunctionPass with a single entry point that supports testing
for dependence between two instructions in a function. If there's no dependence,
it returns null. If there's a dependence, it returns a pointer to a Dependence
which can be queried about details (what kind of dependence, is it loop
independent, direction and distance vector entries, etc). I haven't included
every imaginable feature, but there's a good selection that should be adequate
for supporting many loop transformations. Of course, it can be extended as
necessary.
Included in the patch file are many test cases, commented with C code showing
the loops and array references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165708 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-11 07:32:34 +00:00
|
|
|
|
|
|
|
define void @symbolicsiv3(i32* %A, i32* %B, i64 %n) nounwind uwtable ssp {
|
|
|
|
entry:
|
|
|
|
%cmp1 = icmp eq i64 %n, 0
|
2012-11-13 12:12:02 +00:00
|
|
|
br i1 %cmp1, label %for.end, label %for.body.preheader
|
dependence analysis
Patch from Preston Briggs <preston.briggs@gmail.com>.
This is an updated version of the dependence-analysis patch, including an MIV
test based on Banerjee's inequalities.
It's a fairly complete implementation of the paper
Practical Dependence Testing
Gina Goff, Ken Kennedy, and Chau-Wen Tseng
PLDI 1991
It cannot yet propagate constraints between coupled RDIV subscripts (discussed
in Section 5.3.2 of the paper).
It's organized as a FunctionPass with a single entry point that supports testing
for dependence between two instructions in a function. If there's no dependence,
it returns null. If there's a dependence, it returns a pointer to a Dependence
which can be queried about details (what kind of dependence, is it loop
independent, direction and distance vector entries, etc). I haven't included
every imaginable feature, but there's a good selection that should be adequate
for supporting many loop transformations. Of course, it can be extended as
necessary.
Included in the patch file are many test cases, commented with C code showing
the loops and array references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165708 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-11 07:32:34 +00:00
|
|
|
|
2012-11-27 19:12:26 +00:00
|
|
|
; CHECK: da analyze - none!
|
2012-11-13 12:12:02 +00:00
|
|
|
; CHECK: da analyze - none!
|
|
|
|
; CHECK: da analyze - confused!
|
2012-11-27 19:12:26 +00:00
|
|
|
; CHECK: da analyze - none!
|
2012-11-13 12:12:02 +00:00
|
|
|
; CHECK: da analyze - confused!
|
2012-11-27 19:12:26 +00:00
|
|
|
; CHECK: da analyze - none!
|
2012-11-13 12:12:02 +00:00
|
|
|
|
|
|
|
for.body.preheader: ; preds = %entry
|
|
|
|
br label %for.body
|
|
|
|
|
|
|
|
for.body: ; preds = %for.body.preheader, %for.body
|
|
|
|
%i.03 = phi i64 [ %inc, %for.body ], [ 0, %for.body.preheader ]
|
|
|
|
%B.addr.02 = phi i32* [ %incdec.ptr, %for.body ], [ %B, %for.body.preheader ]
|
dependence analysis
Patch from Preston Briggs <preston.briggs@gmail.com>.
This is an updated version of the dependence-analysis patch, including an MIV
test based on Banerjee's inequalities.
It's a fairly complete implementation of the paper
Practical Dependence Testing
Gina Goff, Ken Kennedy, and Chau-Wen Tseng
PLDI 1991
It cannot yet propagate constraints between coupled RDIV subscripts (discussed
in Section 5.3.2 of the paper).
It's organized as a FunctionPass with a single entry point that supports testing
for dependence between two instructions in a function. If there's no dependence,
it returns null. If there's a dependence, it returns a pointer to a Dependence
which can be queried about details (what kind of dependence, is it loop
independent, direction and distance vector entries, etc). I haven't included
every imaginable feature, but there's a good selection that should be adequate
for supporting many loop transformations. Of course, it can be extended as
necessary.
Included in the patch file are many test cases, commented with C code showing
the loops and array references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165708 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-11 07:32:34 +00:00
|
|
|
%conv = trunc i64 %i.03 to i32
|
|
|
|
%mul = mul nsw i64 %i.03, -2
|
|
|
|
%add = add i64 %mul, %n
|
|
|
|
%add1 = add i64 %add, 1
|
|
|
|
%arrayidx = getelementptr inbounds i32* %A, i64 %add1
|
|
|
|
store i32 %conv, i32* %arrayidx, align 4
|
|
|
|
%mul2 = shl i64 %n, 1
|
|
|
|
%sub = sub i64 %i.03, %mul2
|
|
|
|
%arrayidx3 = getelementptr inbounds i32* %A, i64 %sub
|
|
|
|
%0 = load i32* %arrayidx3, align 4
|
|
|
|
%incdec.ptr = getelementptr inbounds i32* %B.addr.02, i64 1
|
|
|
|
store i32 %0, i32* %B.addr.02, align 4
|
|
|
|
%inc = add nsw i64 %i.03, 1
|
2012-11-13 12:12:02 +00:00
|
|
|
%exitcond = icmp ne i64 %inc, %n
|
|
|
|
br i1 %exitcond, label %for.body, label %for.end.loopexit
|
dependence analysis
Patch from Preston Briggs <preston.briggs@gmail.com>.
This is an updated version of the dependence-analysis patch, including an MIV
test based on Banerjee's inequalities.
It's a fairly complete implementation of the paper
Practical Dependence Testing
Gina Goff, Ken Kennedy, and Chau-Wen Tseng
PLDI 1991
It cannot yet propagate constraints between coupled RDIV subscripts (discussed
in Section 5.3.2 of the paper).
It's organized as a FunctionPass with a single entry point that supports testing
for dependence between two instructions in a function. If there's no dependence,
it returns null. If there's a dependence, it returns a pointer to a Dependence
which can be queried about details (what kind of dependence, is it loop
independent, direction and distance vector entries, etc). I haven't included
every imaginable feature, but there's a good selection that should be adequate
for supporting many loop transformations. Of course, it can be extended as
necessary.
Included in the patch file are many test cases, commented with C code showing
the loops and array references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165708 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-11 07:32:34 +00:00
|
|
|
|
2012-11-13 12:12:02 +00:00
|
|
|
for.end.loopexit: ; preds = %for.body
|
|
|
|
br label %for.end
|
|
|
|
|
|
|
|
for.end: ; preds = %for.end.loopexit, %entry
|
dependence analysis
Patch from Preston Briggs <preston.briggs@gmail.com>.
This is an updated version of the dependence-analysis patch, including an MIV
test based on Banerjee's inequalities.
It's a fairly complete implementation of the paper
Practical Dependence Testing
Gina Goff, Ken Kennedy, and Chau-Wen Tseng
PLDI 1991
It cannot yet propagate constraints between coupled RDIV subscripts (discussed
in Section 5.3.2 of the paper).
It's organized as a FunctionPass with a single entry point that supports testing
for dependence between two instructions in a function. If there's no dependence,
it returns null. If there's a dependence, it returns a pointer to a Dependence
which can be queried about details (what kind of dependence, is it loop
independent, direction and distance vector entries, etc). I haven't included
every imaginable feature, but there's a good selection that should be adequate
for supporting many loop transformations. Of course, it can be extended as
necessary.
Included in the patch file are many test cases, commented with C code showing
the loops and array references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165708 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-11 07:32:34 +00:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2012-11-13 12:12:02 +00:00
|
|
|
;; for (long int i = 0; i < n; i++) {
|
|
|
|
;; A[-2*i + 3*n] = i;
|
|
|
|
;; *B++ = A[-i + n];
|
dependence analysis
Patch from Preston Briggs <preston.briggs@gmail.com>.
This is an updated version of the dependence-analysis patch, including an MIV
test based on Banerjee's inequalities.
It's a fairly complete implementation of the paper
Practical Dependence Testing
Gina Goff, Ken Kennedy, and Chau-Wen Tseng
PLDI 1991
It cannot yet propagate constraints between coupled RDIV subscripts (discussed
in Section 5.3.2 of the paper).
It's organized as a FunctionPass with a single entry point that supports testing
for dependence between two instructions in a function. If there's no dependence,
it returns null. If there's a dependence, it returns a pointer to a Dependence
which can be queried about details (what kind of dependence, is it loop
independent, direction and distance vector entries, etc). I haven't included
every imaginable feature, but there's a good selection that should be adequate
for supporting many loop transformations. Of course, it can be extended as
necessary.
Included in the patch file are many test cases, commented with C code showing
the loops and array references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165708 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-11 07:32:34 +00:00
|
|
|
|
|
|
|
define void @symbolicsiv4(i32* %A, i32* %B, i64 %n) nounwind uwtable ssp {
|
|
|
|
entry:
|
|
|
|
%cmp1 = icmp eq i64 %n, 0
|
2012-11-13 12:12:02 +00:00
|
|
|
br i1 %cmp1, label %for.end, label %for.body.preheader
|
|
|
|
|
2012-11-27 19:12:26 +00:00
|
|
|
; CHECK: da analyze - none!
|
2012-11-13 12:12:02 +00:00
|
|
|
; CHECK: da analyze - none!
|
|
|
|
; CHECK: da analyze - confused!
|
2012-11-27 19:12:26 +00:00
|
|
|
; CHECK: da analyze - none!
|
2012-11-13 12:12:02 +00:00
|
|
|
; CHECK: da analyze - confused!
|
2012-11-27 19:12:26 +00:00
|
|
|
; CHECK: da analyze - none!
|
dependence analysis
Patch from Preston Briggs <preston.briggs@gmail.com>.
This is an updated version of the dependence-analysis patch, including an MIV
test based on Banerjee's inequalities.
It's a fairly complete implementation of the paper
Practical Dependence Testing
Gina Goff, Ken Kennedy, and Chau-Wen Tseng
PLDI 1991
It cannot yet propagate constraints between coupled RDIV subscripts (discussed
in Section 5.3.2 of the paper).
It's organized as a FunctionPass with a single entry point that supports testing
for dependence between two instructions in a function. If there's no dependence,
it returns null. If there's a dependence, it returns a pointer to a Dependence
which can be queried about details (what kind of dependence, is it loop
independent, direction and distance vector entries, etc). I haven't included
every imaginable feature, but there's a good selection that should be adequate
for supporting many loop transformations. Of course, it can be extended as
necessary.
Included in the patch file are many test cases, commented with C code showing
the loops and array references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165708 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-11 07:32:34 +00:00
|
|
|
|
2012-11-13 12:12:02 +00:00
|
|
|
for.body.preheader: ; preds = %entry
|
|
|
|
br label %for.body
|
|
|
|
|
|
|
|
for.body: ; preds = %for.body.preheader, %for.body
|
|
|
|
%i.03 = phi i64 [ %inc, %for.body ], [ 0, %for.body.preheader ]
|
|
|
|
%B.addr.02 = phi i32* [ %incdec.ptr, %for.body ], [ %B, %for.body.preheader ]
|
dependence analysis
Patch from Preston Briggs <preston.briggs@gmail.com>.
This is an updated version of the dependence-analysis patch, including an MIV
test based on Banerjee's inequalities.
It's a fairly complete implementation of the paper
Practical Dependence Testing
Gina Goff, Ken Kennedy, and Chau-Wen Tseng
PLDI 1991
It cannot yet propagate constraints between coupled RDIV subscripts (discussed
in Section 5.3.2 of the paper).
It's organized as a FunctionPass with a single entry point that supports testing
for dependence between two instructions in a function. If there's no dependence,
it returns null. If there's a dependence, it returns a pointer to a Dependence
which can be queried about details (what kind of dependence, is it loop
independent, direction and distance vector entries, etc). I haven't included
every imaginable feature, but there's a good selection that should be adequate
for supporting many loop transformations. Of course, it can be extended as
necessary.
Included in the patch file are many test cases, commented with C code showing
the loops and array references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165708 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-11 07:32:34 +00:00
|
|
|
%conv = trunc i64 %i.03 to i32
|
|
|
|
%mul = mul nsw i64 %i.03, -2
|
|
|
|
%mul1 = mul i64 %n, 3
|
|
|
|
%add = add i64 %mul, %mul1
|
|
|
|
%arrayidx = getelementptr inbounds i32* %A, i64 %add
|
|
|
|
store i32 %conv, i32* %arrayidx, align 4
|
|
|
|
%add2 = sub i64 %n, %i.03
|
|
|
|
%arrayidx3 = getelementptr inbounds i32* %A, i64 %add2
|
|
|
|
%0 = load i32* %arrayidx3, align 4
|
|
|
|
%incdec.ptr = getelementptr inbounds i32* %B.addr.02, i64 1
|
|
|
|
store i32 %0, i32* %B.addr.02, align 4
|
|
|
|
%inc = add nsw i64 %i.03, 1
|
2012-11-13 12:12:02 +00:00
|
|
|
%exitcond = icmp ne i64 %inc, %n
|
|
|
|
br i1 %exitcond, label %for.body, label %for.end.loopexit
|
|
|
|
|
|
|
|
for.end.loopexit: ; preds = %for.body
|
|
|
|
br label %for.end
|
dependence analysis
Patch from Preston Briggs <preston.briggs@gmail.com>.
This is an updated version of the dependence-analysis patch, including an MIV
test based on Banerjee's inequalities.
It's a fairly complete implementation of the paper
Practical Dependence Testing
Gina Goff, Ken Kennedy, and Chau-Wen Tseng
PLDI 1991
It cannot yet propagate constraints between coupled RDIV subscripts (discussed
in Section 5.3.2 of the paper).
It's organized as a FunctionPass with a single entry point that supports testing
for dependence between two instructions in a function. If there's no dependence,
it returns null. If there's a dependence, it returns a pointer to a Dependence
which can be queried about details (what kind of dependence, is it loop
independent, direction and distance vector entries, etc). I haven't included
every imaginable feature, but there's a good selection that should be adequate
for supporting many loop transformations. Of course, it can be extended as
necessary.
Included in the patch file are many test cases, commented with C code showing
the loops and array references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165708 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-11 07:32:34 +00:00
|
|
|
|
2012-11-13 12:12:02 +00:00
|
|
|
for.end: ; preds = %for.end.loopexit, %entry
|
dependence analysis
Patch from Preston Briggs <preston.briggs@gmail.com>.
This is an updated version of the dependence-analysis patch, including an MIV
test based on Banerjee's inequalities.
It's a fairly complete implementation of the paper
Practical Dependence Testing
Gina Goff, Ken Kennedy, and Chau-Wen Tseng
PLDI 1991
It cannot yet propagate constraints between coupled RDIV subscripts (discussed
in Section 5.3.2 of the paper).
It's organized as a FunctionPass with a single entry point that supports testing
for dependence between two instructions in a function. If there's no dependence,
it returns null. If there's a dependence, it returns a pointer to a Dependence
which can be queried about details (what kind of dependence, is it loop
independent, direction and distance vector entries, etc). I haven't included
every imaginable feature, but there's a good selection that should be adequate
for supporting many loop transformations. Of course, it can be extended as
necessary.
Included in the patch file are many test cases, commented with C code showing
the loops and array references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165708 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-11 07:32:34 +00:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2012-11-13 12:12:02 +00:00
|
|
|
;; for (long int i = 0; i < n; i++) {
|
|
|
|
;; A[-2*i - 2*n] = i;
|
|
|
|
;; *B++ = A[-i - n];
|
dependence analysis
Patch from Preston Briggs <preston.briggs@gmail.com>.
This is an updated version of the dependence-analysis patch, including an MIV
test based on Banerjee's inequalities.
It's a fairly complete implementation of the paper
Practical Dependence Testing
Gina Goff, Ken Kennedy, and Chau-Wen Tseng
PLDI 1991
It cannot yet propagate constraints between coupled RDIV subscripts (discussed
in Section 5.3.2 of the paper).
It's organized as a FunctionPass with a single entry point that supports testing
for dependence between two instructions in a function. If there's no dependence,
it returns null. If there's a dependence, it returns a pointer to a Dependence
which can be queried about details (what kind of dependence, is it loop
independent, direction and distance vector entries, etc). I haven't included
every imaginable feature, but there's a good selection that should be adequate
for supporting many loop transformations. Of course, it can be extended as
necessary.
Included in the patch file are many test cases, commented with C code showing
the loops and array references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165708 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-11 07:32:34 +00:00
|
|
|
|
|
|
|
define void @symbolicsiv5(i32* %A, i32* %B, i64 %n) nounwind uwtable ssp {
|
|
|
|
entry:
|
|
|
|
%cmp1 = icmp eq i64 %n, 0
|
2012-11-13 12:12:02 +00:00
|
|
|
br i1 %cmp1, label %for.end, label %for.body.preheader
|
|
|
|
|
2012-11-27 19:12:26 +00:00
|
|
|
; CHECK: da analyze - none!
|
2012-11-13 12:12:02 +00:00
|
|
|
; CHECK: da analyze - none!
|
|
|
|
; CHECK: da analyze - confused!
|
2012-11-27 19:12:26 +00:00
|
|
|
; CHECK: da analyze - none!
|
2012-11-13 12:12:02 +00:00
|
|
|
; CHECK: da analyze - confused!
|
2012-11-27 19:12:26 +00:00
|
|
|
; CHECK: da analyze - none!
|
dependence analysis
Patch from Preston Briggs <preston.briggs@gmail.com>.
This is an updated version of the dependence-analysis patch, including an MIV
test based on Banerjee's inequalities.
It's a fairly complete implementation of the paper
Practical Dependence Testing
Gina Goff, Ken Kennedy, and Chau-Wen Tseng
PLDI 1991
It cannot yet propagate constraints between coupled RDIV subscripts (discussed
in Section 5.3.2 of the paper).
It's organized as a FunctionPass with a single entry point that supports testing
for dependence between two instructions in a function. If there's no dependence,
it returns null. If there's a dependence, it returns a pointer to a Dependence
which can be queried about details (what kind of dependence, is it loop
independent, direction and distance vector entries, etc). I haven't included
every imaginable feature, but there's a good selection that should be adequate
for supporting many loop transformations. Of course, it can be extended as
necessary.
Included in the patch file are many test cases, commented with C code showing
the loops and array references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165708 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-11 07:32:34 +00:00
|
|
|
|
2012-11-13 12:12:02 +00:00
|
|
|
for.body.preheader: ; preds = %entry
|
|
|
|
br label %for.body
|
|
|
|
|
|
|
|
for.body: ; preds = %for.body.preheader, %for.body
|
|
|
|
%i.03 = phi i64 [ %inc, %for.body ], [ 0, %for.body.preheader ]
|
|
|
|
%B.addr.02 = phi i32* [ %incdec.ptr, %for.body ], [ %B, %for.body.preheader ]
|
dependence analysis
Patch from Preston Briggs <preston.briggs@gmail.com>.
This is an updated version of the dependence-analysis patch, including an MIV
test based on Banerjee's inequalities.
It's a fairly complete implementation of the paper
Practical Dependence Testing
Gina Goff, Ken Kennedy, and Chau-Wen Tseng
PLDI 1991
It cannot yet propagate constraints between coupled RDIV subscripts (discussed
in Section 5.3.2 of the paper).
It's organized as a FunctionPass with a single entry point that supports testing
for dependence between two instructions in a function. If there's no dependence,
it returns null. If there's a dependence, it returns a pointer to a Dependence
which can be queried about details (what kind of dependence, is it loop
independent, direction and distance vector entries, etc). I haven't included
every imaginable feature, but there's a good selection that should be adequate
for supporting many loop transformations. Of course, it can be extended as
necessary.
Included in the patch file are many test cases, commented with C code showing
the loops and array references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165708 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-11 07:32:34 +00:00
|
|
|
%conv = trunc i64 %i.03 to i32
|
|
|
|
%mul = mul nsw i64 %i.03, -2
|
|
|
|
%mul1 = shl i64 %n, 1
|
|
|
|
%sub = sub i64 %mul, %mul1
|
|
|
|
%arrayidx = getelementptr inbounds i32* %A, i64 %sub
|
|
|
|
store i32 %conv, i32* %arrayidx, align 4
|
|
|
|
%sub2 = sub nsw i64 0, %i.03
|
|
|
|
%sub3 = sub i64 %sub2, %n
|
|
|
|
%arrayidx4 = getelementptr inbounds i32* %A, i64 %sub3
|
|
|
|
%0 = load i32* %arrayidx4, align 4
|
|
|
|
%incdec.ptr = getelementptr inbounds i32* %B.addr.02, i64 1
|
|
|
|
store i32 %0, i32* %B.addr.02, align 4
|
|
|
|
%inc = add nsw i64 %i.03, 1
|
2012-11-13 12:12:02 +00:00
|
|
|
%exitcond = icmp ne i64 %inc, %n
|
|
|
|
br i1 %exitcond, label %for.body, label %for.end.loopexit
|
|
|
|
|
|
|
|
for.end.loopexit: ; preds = %for.body
|
|
|
|
br label %for.end
|
dependence analysis
Patch from Preston Briggs <preston.briggs@gmail.com>.
This is an updated version of the dependence-analysis patch, including an MIV
test based on Banerjee's inequalities.
It's a fairly complete implementation of the paper
Practical Dependence Testing
Gina Goff, Ken Kennedy, and Chau-Wen Tseng
PLDI 1991
It cannot yet propagate constraints between coupled RDIV subscripts (discussed
in Section 5.3.2 of the paper).
It's organized as a FunctionPass with a single entry point that supports testing
for dependence between two instructions in a function. If there's no dependence,
it returns null. If there's a dependence, it returns a pointer to a Dependence
which can be queried about details (what kind of dependence, is it loop
independent, direction and distance vector entries, etc). I haven't included
every imaginable feature, but there's a good selection that should be adequate
for supporting many loop transformations. Of course, it can be extended as
necessary.
Included in the patch file are many test cases, commented with C code showing
the loops and array references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165708 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-11 07:32:34 +00:00
|
|
|
|
2012-11-13 12:12:02 +00:00
|
|
|
for.end: ; preds = %for.end.loopexit, %entry
|
dependence analysis
Patch from Preston Briggs <preston.briggs@gmail.com>.
This is an updated version of the dependence-analysis patch, including an MIV
test based on Banerjee's inequalities.
It's a fairly complete implementation of the paper
Practical Dependence Testing
Gina Goff, Ken Kennedy, and Chau-Wen Tseng
PLDI 1991
It cannot yet propagate constraints between coupled RDIV subscripts (discussed
in Section 5.3.2 of the paper).
It's organized as a FunctionPass with a single entry point that supports testing
for dependence between two instructions in a function. If there's no dependence,
it returns null. If there's a dependence, it returns a pointer to a Dependence
which can be queried about details (what kind of dependence, is it loop
independent, direction and distance vector entries, etc). I haven't included
every imaginable feature, but there's a good selection that should be adequate
for supporting many loop transformations. Of course, it can be extended as
necessary.
Included in the patch file are many test cases, commented with C code showing
the loops and array references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165708 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-11 07:32:34 +00:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
;; why doesn't SCEV package understand that n >= 0?
|
2012-11-13 12:12:02 +00:00
|
|
|
;; for (long unsigned i = 0; i < n; i++) {
|
|
|
|
;; A[i + n + 1] = i;
|
|
|
|
;; *B++ = A[-i];
|
dependence analysis
Patch from Preston Briggs <preston.briggs@gmail.com>.
This is an updated version of the dependence-analysis patch, including an MIV
test based on Banerjee's inequalities.
It's a fairly complete implementation of the paper
Practical Dependence Testing
Gina Goff, Ken Kennedy, and Chau-Wen Tseng
PLDI 1991
It cannot yet propagate constraints between coupled RDIV subscripts (discussed
in Section 5.3.2 of the paper).
It's organized as a FunctionPass with a single entry point that supports testing
for dependence between two instructions in a function. If there's no dependence,
it returns null. If there's a dependence, it returns a pointer to a Dependence
which can be queried about details (what kind of dependence, is it loop
independent, direction and distance vector entries, etc). I haven't included
every imaginable feature, but there's a good selection that should be adequate
for supporting many loop transformations. Of course, it can be extended as
necessary.
Included in the patch file are many test cases, commented with C code showing
the loops and array references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165708 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-11 07:32:34 +00:00
|
|
|
|
|
|
|
define void @weaktest(i32* %A, i32* %B, i64 %n) nounwind uwtable ssp {
|
|
|
|
entry:
|
|
|
|
%cmp1 = icmp eq i64 %n, 0
|
2012-11-13 12:12:02 +00:00
|
|
|
br i1 %cmp1, label %for.end, label %for.body.preheader
|
dependence analysis
Patch from Preston Briggs <preston.briggs@gmail.com>.
This is an updated version of the dependence-analysis patch, including an MIV
test based on Banerjee's inequalities.
It's a fairly complete implementation of the paper
Practical Dependence Testing
Gina Goff, Ken Kennedy, and Chau-Wen Tseng
PLDI 1991
It cannot yet propagate constraints between coupled RDIV subscripts (discussed
in Section 5.3.2 of the paper).
It's organized as a FunctionPass with a single entry point that supports testing
for dependence between two instructions in a function. If there's no dependence,
it returns null. If there's a dependence, it returns a pointer to a Dependence
which can be queried about details (what kind of dependence, is it loop
independent, direction and distance vector entries, etc). I haven't included
every imaginable feature, but there's a good selection that should be adequate
for supporting many loop transformations. Of course, it can be extended as
necessary.
Included in the patch file are many test cases, commented with C code showing
the loops and array references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165708 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-11 07:32:34 +00:00
|
|
|
|
2012-11-27 19:12:26 +00:00
|
|
|
; CHECK: da analyze - none!
|
2012-11-13 12:12:02 +00:00
|
|
|
; CHECK: da analyze - flow [*|<] splitable!
|
|
|
|
; CHECK: da analyze - split level = 1, iteration = ((0 smax (-1 + (-1 * %n))) /u 2)!
|
|
|
|
; CHECK: da analyze - confused!
|
2012-11-27 19:12:26 +00:00
|
|
|
; CHECK: da analyze - none!
|
2012-11-13 12:12:02 +00:00
|
|
|
; CHECK: da analyze - confused!
|
2012-11-27 19:12:26 +00:00
|
|
|
; CHECK: da analyze - none!
|
2012-11-13 12:12:02 +00:00
|
|
|
|
|
|
|
for.body.preheader: ; preds = %entry
|
|
|
|
br label %for.body
|
|
|
|
|
|
|
|
for.body: ; preds = %for.body.preheader, %for.body
|
|
|
|
%i.03 = phi i64 [ %inc, %for.body ], [ 0, %for.body.preheader ]
|
|
|
|
%B.addr.02 = phi i32* [ %incdec.ptr, %for.body ], [ %B, %for.body.preheader ]
|
dependence analysis
Patch from Preston Briggs <preston.briggs@gmail.com>.
This is an updated version of the dependence-analysis patch, including an MIV
test based on Banerjee's inequalities.
It's a fairly complete implementation of the paper
Practical Dependence Testing
Gina Goff, Ken Kennedy, and Chau-Wen Tseng
PLDI 1991
It cannot yet propagate constraints between coupled RDIV subscripts (discussed
in Section 5.3.2 of the paper).
It's organized as a FunctionPass with a single entry point that supports testing
for dependence between two instructions in a function. If there's no dependence,
it returns null. If there's a dependence, it returns a pointer to a Dependence
which can be queried about details (what kind of dependence, is it loop
independent, direction and distance vector entries, etc). I haven't included
every imaginable feature, but there's a good selection that should be adequate
for supporting many loop transformations. Of course, it can be extended as
necessary.
Included in the patch file are many test cases, commented with C code showing
the loops and array references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165708 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-11 07:32:34 +00:00
|
|
|
%conv = trunc i64 %i.03 to i32
|
|
|
|
%add = add i64 %i.03, %n
|
|
|
|
%add1 = add i64 %add, 1
|
|
|
|
%arrayidx = getelementptr inbounds i32* %A, i64 %add1
|
|
|
|
store i32 %conv, i32* %arrayidx, align 4
|
|
|
|
%sub = sub i64 0, %i.03
|
|
|
|
%arrayidx2 = getelementptr inbounds i32* %A, i64 %sub
|
|
|
|
%0 = load i32* %arrayidx2, align 4
|
|
|
|
%incdec.ptr = getelementptr inbounds i32* %B.addr.02, i64 1
|
|
|
|
store i32 %0, i32* %B.addr.02, align 4
|
|
|
|
%inc = add i64 %i.03, 1
|
2012-11-13 12:12:02 +00:00
|
|
|
%exitcond = icmp ne i64 %inc, %n
|
|
|
|
br i1 %exitcond, label %for.body, label %for.end.loopexit
|
|
|
|
|
|
|
|
for.end.loopexit: ; preds = %for.body
|
|
|
|
br label %for.end
|
dependence analysis
Patch from Preston Briggs <preston.briggs@gmail.com>.
This is an updated version of the dependence-analysis patch, including an MIV
test based on Banerjee's inequalities.
It's a fairly complete implementation of the paper
Practical Dependence Testing
Gina Goff, Ken Kennedy, and Chau-Wen Tseng
PLDI 1991
It cannot yet propagate constraints between coupled RDIV subscripts (discussed
in Section 5.3.2 of the paper).
It's organized as a FunctionPass with a single entry point that supports testing
for dependence between two instructions in a function. If there's no dependence,
it returns null. If there's a dependence, it returns a pointer to a Dependence
which can be queried about details (what kind of dependence, is it loop
independent, direction and distance vector entries, etc). I haven't included
every imaginable feature, but there's a good selection that should be adequate
for supporting many loop transformations. Of course, it can be extended as
necessary.
Included in the patch file are many test cases, commented with C code showing
the loops and array references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165708 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-11 07:32:34 +00:00
|
|
|
|
2012-11-13 12:12:02 +00:00
|
|
|
for.end: ; preds = %for.end.loopexit, %entry
|
dependence analysis
Patch from Preston Briggs <preston.briggs@gmail.com>.
This is an updated version of the dependence-analysis patch, including an MIV
test based on Banerjee's inequalities.
It's a fairly complete implementation of the paper
Practical Dependence Testing
Gina Goff, Ken Kennedy, and Chau-Wen Tseng
PLDI 1991
It cannot yet propagate constraints between coupled RDIV subscripts (discussed
in Section 5.3.2 of the paper).
It's organized as a FunctionPass with a single entry point that supports testing
for dependence between two instructions in a function. If there's no dependence,
it returns null. If there's a dependence, it returns a pointer to a Dependence
which can be queried about details (what kind of dependence, is it loop
independent, direction and distance vector entries, etc). I haven't included
every imaginable feature, but there's a good selection that should be adequate
for supporting many loop transformations. Of course, it can be extended as
necessary.
Included in the patch file are many test cases, commented with C code showing
the loops and array references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165708 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-11 07:32:34 +00:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2012-11-13 12:12:02 +00:00
|
|
|
;; for (long int i = 0; i < n; i++) {
|
|
|
|
;; A[4*N*i + M] = i;
|
|
|
|
;; *B++ = A[4*N*i + 3*M + 1];
|
dependence analysis
Patch from Preston Briggs <preston.briggs@gmail.com>.
This is an updated version of the dependence-analysis patch, including an MIV
test based on Banerjee's inequalities.
It's a fairly complete implementation of the paper
Practical Dependence Testing
Gina Goff, Ken Kennedy, and Chau-Wen Tseng
PLDI 1991
It cannot yet propagate constraints between coupled RDIV subscripts (discussed
in Section 5.3.2 of the paper).
It's organized as a FunctionPass with a single entry point that supports testing
for dependence between two instructions in a function. If there's no dependence,
it returns null. If there's a dependence, it returns a pointer to a Dependence
which can be queried about details (what kind of dependence, is it loop
independent, direction and distance vector entries, etc). I haven't included
every imaginable feature, but there's a good selection that should be adequate
for supporting many loop transformations. Of course, it can be extended as
necessary.
Included in the patch file are many test cases, commented with C code showing
the loops and array references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165708 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-11 07:32:34 +00:00
|
|
|
|
|
|
|
define void @symbolicsiv6(i32* %A, i32* %B, i64 %n, i64 %N, i64 %M) nounwind uwtable ssp {
|
|
|
|
entry:
|
|
|
|
%cmp1 = icmp eq i64 %n, 0
|
|
|
|
br i1 %cmp1, label %for.end, label %for.body.preheader
|
|
|
|
|
2012-11-27 19:12:26 +00:00
|
|
|
; CHECK: da analyze - none!
|
2012-11-13 12:12:02 +00:00
|
|
|
; CHECK: da analyze - none!
|
|
|
|
; CHECK: da analyze - confused!
|
2012-11-27 19:12:26 +00:00
|
|
|
; CHECK: da analyze - none!
|
2012-11-13 12:12:02 +00:00
|
|
|
; CHECK: da analyze - confused!
|
2012-11-27 19:12:26 +00:00
|
|
|
; CHECK: da analyze - none!
|
2012-11-13 12:12:02 +00:00
|
|
|
|
dependence analysis
Patch from Preston Briggs <preston.briggs@gmail.com>.
This is an updated version of the dependence-analysis patch, including an MIV
test based on Banerjee's inequalities.
It's a fairly complete implementation of the paper
Practical Dependence Testing
Gina Goff, Ken Kennedy, and Chau-Wen Tseng
PLDI 1991
It cannot yet propagate constraints between coupled RDIV subscripts (discussed
in Section 5.3.2 of the paper).
It's organized as a FunctionPass with a single entry point that supports testing
for dependence between two instructions in a function. If there's no dependence,
it returns null. If there's a dependence, it returns a pointer to a Dependence
which can be queried about details (what kind of dependence, is it loop
independent, direction and distance vector entries, etc). I haven't included
every imaginable feature, but there's a good selection that should be adequate
for supporting many loop transformations. Of course, it can be extended as
necessary.
Included in the patch file are many test cases, commented with C code showing
the loops and array references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165708 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-11 07:32:34 +00:00
|
|
|
for.body.preheader: ; preds = %entry
|
|
|
|
br label %for.body
|
|
|
|
|
|
|
|
for.body: ; preds = %for.body.preheader, %for.body
|
|
|
|
%i.03 = phi i64 [ %inc, %for.body ], [ 0, %for.body.preheader ]
|
|
|
|
%B.addr.02 = phi i32* [ %incdec.ptr, %for.body ], [ %B, %for.body.preheader ]
|
|
|
|
%conv = trunc i64 %i.03 to i32
|
|
|
|
%mul = shl i64 %N, 2
|
|
|
|
%mul1 = mul i64 %mul, %i.03
|
|
|
|
%add = add i64 %mul1, %M
|
|
|
|
%arrayidx = getelementptr inbounds i32* %A, i64 %add
|
|
|
|
store i32 %conv, i32* %arrayidx, align 4
|
|
|
|
%mul2 = shl i64 %N, 2
|
|
|
|
%mul3 = mul i64 %mul2, %i.03
|
|
|
|
%mul4 = mul i64 %M, 3
|
|
|
|
%add5 = add i64 %mul3, %mul4
|
|
|
|
%add6 = add i64 %add5, 1
|
|
|
|
%arrayidx7 = getelementptr inbounds i32* %A, i64 %add6
|
|
|
|
%0 = load i32* %arrayidx7, align 4
|
|
|
|
%incdec.ptr = getelementptr inbounds i32* %B.addr.02, i64 1
|
|
|
|
store i32 %0, i32* %B.addr.02, align 4
|
|
|
|
%inc = add nsw i64 %i.03, 1
|
|
|
|
%exitcond = icmp ne i64 %inc, %n
|
|
|
|
br i1 %exitcond, label %for.body, label %for.end.loopexit
|
|
|
|
|
|
|
|
for.end.loopexit: ; preds = %for.body
|
|
|
|
br label %for.end
|
|
|
|
|
|
|
|
for.end: ; preds = %for.end.loopexit, %entry
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2012-11-13 12:12:02 +00:00
|
|
|
;; for (long int i = 0; i < n; i++) {
|
|
|
|
;; A[2*N*i + M] = i;
|
|
|
|
;; *B++ = A[2*N*i - 3*M + 2];
|
dependence analysis
Patch from Preston Briggs <preston.briggs@gmail.com>.
This is an updated version of the dependence-analysis patch, including an MIV
test based on Banerjee's inequalities.
It's a fairly complete implementation of the paper
Practical Dependence Testing
Gina Goff, Ken Kennedy, and Chau-Wen Tseng
PLDI 1991
It cannot yet propagate constraints between coupled RDIV subscripts (discussed
in Section 5.3.2 of the paper).
It's organized as a FunctionPass with a single entry point that supports testing
for dependence between two instructions in a function. If there's no dependence,
it returns null. If there's a dependence, it returns a pointer to a Dependence
which can be queried about details (what kind of dependence, is it loop
independent, direction and distance vector entries, etc). I haven't included
every imaginable feature, but there's a good selection that should be adequate
for supporting many loop transformations. Of course, it can be extended as
necessary.
Included in the patch file are many test cases, commented with C code showing
the loops and array references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165708 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-11 07:32:34 +00:00
|
|
|
|
|
|
|
define void @symbolicsiv7(i32* %A, i32* %B, i64 %n, i64 %N, i64 %M) nounwind uwtable ssp {
|
|
|
|
entry:
|
|
|
|
%cmp1 = icmp eq i64 %n, 0
|
|
|
|
br i1 %cmp1, label %for.end, label %for.body.preheader
|
|
|
|
|
2012-11-27 19:12:26 +00:00
|
|
|
; CHECK: da analyze - none!
|
2012-11-13 12:12:02 +00:00
|
|
|
; CHECK: da analyze - flow [<>]!
|
|
|
|
; CHECK: da analyze - confused!
|
2012-11-27 19:12:26 +00:00
|
|
|
; CHECK: da analyze - none!
|
2012-11-13 12:12:02 +00:00
|
|
|
; CHECK: da analyze - confused!
|
2012-11-27 19:12:26 +00:00
|
|
|
; CHECK: da analyze - none!
|
2012-11-13 12:12:02 +00:00
|
|
|
|
dependence analysis
Patch from Preston Briggs <preston.briggs@gmail.com>.
This is an updated version of the dependence-analysis patch, including an MIV
test based on Banerjee's inequalities.
It's a fairly complete implementation of the paper
Practical Dependence Testing
Gina Goff, Ken Kennedy, and Chau-Wen Tseng
PLDI 1991
It cannot yet propagate constraints between coupled RDIV subscripts (discussed
in Section 5.3.2 of the paper).
It's organized as a FunctionPass with a single entry point that supports testing
for dependence between two instructions in a function. If there's no dependence,
it returns null. If there's a dependence, it returns a pointer to a Dependence
which can be queried about details (what kind of dependence, is it loop
independent, direction and distance vector entries, etc). I haven't included
every imaginable feature, but there's a good selection that should be adequate
for supporting many loop transformations. Of course, it can be extended as
necessary.
Included in the patch file are many test cases, commented with C code showing
the loops and array references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165708 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-11 07:32:34 +00:00
|
|
|
for.body.preheader: ; preds = %entry
|
|
|
|
br label %for.body
|
|
|
|
|
|
|
|
for.body: ; preds = %for.body.preheader, %for.body
|
|
|
|
%i.03 = phi i64 [ %inc, %for.body ], [ 0, %for.body.preheader ]
|
|
|
|
%B.addr.02 = phi i32* [ %incdec.ptr, %for.body ], [ %B, %for.body.preheader ]
|
|
|
|
%conv = trunc i64 %i.03 to i32
|
|
|
|
%mul = shl i64 %N, 1
|
|
|
|
%mul1 = mul i64 %mul, %i.03
|
|
|
|
%add = add i64 %mul1, %M
|
|
|
|
%arrayidx = getelementptr inbounds i32* %A, i64 %add
|
|
|
|
store i32 %conv, i32* %arrayidx, align 4
|
|
|
|
%mul2 = shl i64 %N, 1
|
|
|
|
%mul3 = mul i64 %mul2, %i.03
|
|
|
|
%0 = mul i64 %M, -3
|
|
|
|
%sub = add i64 %mul3, %0
|
|
|
|
%add5 = add i64 %sub, 2
|
|
|
|
%arrayidx6 = getelementptr inbounds i32* %A, i64 %add5
|
|
|
|
%1 = load i32* %arrayidx6, align 4
|
|
|
|
%incdec.ptr = getelementptr inbounds i32* %B.addr.02, i64 1
|
|
|
|
store i32 %1, i32* %B.addr.02, align 4
|
|
|
|
%inc = add nsw i64 %i.03, 1
|
|
|
|
%exitcond = icmp ne i64 %inc, %n
|
|
|
|
br i1 %exitcond, label %for.body, label %for.end.loopexit
|
|
|
|
|
|
|
|
for.end.loopexit: ; preds = %for.body
|
|
|
|
br label %for.end
|
|
|
|
|
|
|
|
for.end: ; preds = %for.end.loopexit, %entry
|
|
|
|
ret void
|
|
|
|
}
|