summaryrefslogtreecommitdiff
path: root/test/Analysis/DependenceAnalysis/GCD.ll
diff options
context:
space:
mode:
authorSebastian Pop <spop@codeaurora.org>2014-05-07 18:01:20 +0000
committerSebastian Pop <spop@codeaurora.org>2014-05-07 18:01:20 +0000
commit5026b2cc8b1e49412a4dcf29dab578a8a297a172 (patch)
treeff15dae12e06fc264afd6fa9c5b670ec981034f7 /test/Analysis/DependenceAnalysis/GCD.ll
parent905e33545cd426075e8e091074b0f445126bd130 (diff)
downloadllvm-5026b2cc8b1e49412a4dcf29dab578a8a297a172.tar.gz
llvm-5026b2cc8b1e49412a4dcf29dab578a8a297a172.tar.bz2
llvm-5026b2cc8b1e49412a4dcf29dab578a8a297a172.tar.xz
split delinearization pass in 3 steps
To compute the dimensions of the array in a unique way, we split the delinearization analysis in three steps: - find parametric terms in all memory access functions - compute the array dimensions from the set of terms - compute the delinearized access functions for each dimension The first step is executed on all the memory access functions such that we gather all the patterns in which an array is accessed. The second step reduces all this information in a unique description of the sizes of the array. The third step is delinearizing each memory access function following the common description of the shape of the array computed in step 2. This rewrite of the delinearization pass also solves a problem we had with the previous implementation: because the previous algorithm was by induction on the structure of the SCEV, it would not correctly recognize the shape of the array when the memory access was not following the nesting of the loops: for example, see polly/test/ScopInfo/multidim_only_ivs_3d_reverse.ll ; void foo(long n, long m, long o, double A[n][m][o]) { ; ; for (long i = 0; i < n; i++) ; for (long j = 0; j < m; j++) ; for (long k = 0; k < o; k++) ; A[i][k][j] = 1.0; Starting with this patch we no longer delinearize access functions that do not contain parameters, for example in test/Analysis/DependenceAnalysis/GCD.ll ;; for (long int i = 0; i < 100; i++) ;; for (long int j = 0; j < 100; j++) { ;; A[2*i - 4*j] = i; ;; *B++ = A[6*i + 8*j]; these accesses will not be delinearized as the upper bound of the loops are constants, and their access functions do not contain SCEVUnknown parameters. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208232 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis/DependenceAnalysis/GCD.ll')
-rw-r--r--test/Analysis/DependenceAnalysis/GCD.ll22
1 files changed, 11 insertions, 11 deletions
diff --git a/test/Analysis/DependenceAnalysis/GCD.ll b/test/Analysis/DependenceAnalysis/GCD.ll
index 7efa8b5019..fd9173b924 100644
--- a/test/Analysis/DependenceAnalysis/GCD.ll
+++ b/test/Analysis/DependenceAnalysis/GCD.ll
@@ -24,10 +24,10 @@ entry:
; CHECK: da analyze - none!
; DELIN: 'Dependence Analysis' for function 'gcd0'
-; DELIN: da analyze - none!
+; DELIN: da analyze - output [* *]!
; DELIN: da analyze - flow [=> *|<]!
; DELIN: da analyze - confused!
-; DELIN: da analyze - none!
+; DELIN: da analyze - input [* *]!
; DELIN: da analyze - confused!
; DELIN: da analyze - none!
@@ -85,10 +85,10 @@ entry:
; CHECK: da analyze - none!
; DELIN: 'Dependence Analysis' for function 'gcd1'
-; DELIN: da analyze - none!
+; DELIN: da analyze - output [* *]!
; DELIN: da analyze - none!
; DELIN: da analyze - confused!
-; DELIN: da analyze - none!
+; DELIN: da analyze - input [* *]!
; DELIN: da analyze - confused!
; DELIN: da analyze - none!
@@ -147,10 +147,10 @@ entry:
; CHECK: da analyze - none!
; DELIN: 'Dependence Analysis' for function 'gcd2'
-; DELIN: da analyze - none!
+; DELIN: da analyze - output [* *]!
; DELIN: da analyze - none!
; DELIN: da analyze - confused!
-; DELIN: da analyze - none!
+; DELIN: da analyze - input [* *]!
; DELIN: da analyze - confused!
; DELIN: da analyze - none!
@@ -269,10 +269,10 @@ entry:
; CHECK: da analyze - none!
; DELIN: 'Dependence Analysis' for function 'gcd4'
-; DELIN: da analyze - output [* *]!
+; DELIN: da analyze - none!
; DELIN: da analyze - none!
; DELIN: da analyze - confused!
-; DELIN: da analyze - input [* *]!
+; DELIN: da analyze - none!
; DELIN: da analyze - confused!
; DELIN: da analyze - none!
@@ -339,10 +339,10 @@ entry:
; CHECK: da analyze - none!
; DELIN: 'Dependence Analysis' for function 'gcd5'
-; DELIN: da analyze - output [* *]!
+; DELIN: da analyze - none!
; DELIN: da analyze - flow [<> *]!
; DELIN: da analyze - confused!
-; DELIN: da analyze - input [* *]!
+; DELIN: da analyze - none!
; DELIN: da analyze - confused!
; DELIN: da analyze - none!
@@ -411,7 +411,7 @@ entry:
; DELIN: 'Dependence Analysis' for function 'gcd6'
; DELIN: da analyze - none!
-; DELIN: da analyze - none!
+; DELIN: da analyze - flow [=> =>|<]!
; DELIN: da analyze - confused!
; DELIN: da analyze - none!
; DELIN: da analyze - confused!