arporter / habakkuk

Fortran code analysis for performance prediction
11 stars 0 forks source link

Correct cache-line access counts when array is written after read #34

Closed arporter closed 7 years ago

arporter commented 7 years ago

For code of the form:

b(i) = 3*a(i)
a(i) = 2

Habakkuk will count three cache-line accesses. This is because the assignment to a(i) creates a new node in the DAG (named "a'(i)") which is then seen as a new array access. This is clearly incorrect.

arporter commented 7 years ago

Created the cache_count branch for this work. Added a failing test that demonstrates the problem.

arporter commented 7 years ago

In fixing the original bug I discovered that my code to count non-contiguous accesses of arrays with rank greater than 1 was wrong. I need to fix this for rank 1 arrays too.

arporter commented 7 years ago

In adding new tests for this functionality I've discovered that Habakkuk is no longer handling indirect array accesses - it is 'losing' the information on the full array-index expression. I've created #40 to fix this rather than muddy the waters in this issue.

arporter commented 7 years ago

PR #41 merged to master. Closing issue.