[PATCH] Fix crash in Dependence Analysis module
hfinkel at anl.gov
hfinkel at anl.gov
Mon Mar 9 12:34:15 PDT 2015
I don't object to this fix, as such, but is the logic you're fixing even right? Your test case has:
struct s {
int A[10][10];
int C[10][10][10];
} S;
void dep_constraint_crash_test(int k,int N) {
for( int i=0;i<N;i++)
for( int j=0;j<N;j++)
S.A[0][0] = S.C[0][0][k];
}
but what if it has:
struct s {
int C[10][10][10];
int A[10][10];
} S;
void dep_constraint_crash_test(int k,int N) {
for( int i=0;i<N;i++)
for( int j=0;j<N;j++)
S.A[0][0] = S.C[0][0][k];
}
what does it say about the dependence of the two? If k > 10, then it could overlap with S.A[0][0].
REPOSITORY
rL LLVM
http://reviews.llvm.org/D8162
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list