Displaying 3 results from an estimated 3 matches for "move_one_alt".
2017 Jun 21
2
A bug in DependenceAnalysis?
...denceAnalysisWrapperPass to compute the dependencies between all
instructions of a loop. I have the following two examples of code I wish to
analyse:
example A:
```
void move_one(int *A, unsigned n) {
for (unsigned i = 0; i < n-1; ++i) {
A[i] = A[i + 1];
}
}
```
and example B:
```
void move_one_alt(int *A, unsigned n) {
int *B = A + 1;
for (unsigned i = 0; i < n-1; ++i) {
A[i] = B[i];
}
}
```
I would expect that I get the same result for both A and B, namely a loop
carried anti (WAR) dependence from the generated load instruction to the
generated store instruction. This should b...
2017 Jun 21
2
A bug in DependenceAnalysis?
...xamples of code I wish to analyse:
>>
>> example A:
>>
>> ```
>> void move_one(int *A, unsigned n) {
>> for (unsigned i = 0; i < n-1; ++i) {
>> A[i] = A[i + 1];
>> }
>> }
>> ```
>> and example B:
>> ```
>> void move_one_alt(int *A, unsigned n) {
>> int *B = A + 1;
>> for (unsigned i = 0; i < n-1; ++i) {
>> A[i] = B[i];
>> }
>> }
>> ```
>>
>> I would expect that I get the same result for both A and B, namely a loop
>> carried anti (WAR) dependence from...
2017 Jun 22
2
A bug in DependenceAnalysis?
...*
*; <label>:13: ; preds = %6*
* %14 = add i32 %.0, 1*
* br label %3*
*; <label>:15: ; preds = %3*
* ret void*
*}*
Here's the .ll code for example B:
*; Function Attrs: nounwind uwtable*
*define void @_Z12move_one_altPij(i32*, i32) #3 {*
* %3 = getelementptr inbounds i32, i32* %0, i64 1*
* br label %4*
*; <label>:4: ; preds = %13, %2*
* %.0 = phi i32 [ 0, %2 ], [ %14, %13 ]*
* %5 = sub i32 %1, 1*
* %6 = icmp ult i32 %.0, %5*
* br i1 %6, label %7, label %15*
*; &...