[polly] [polly] Add profitability check for expanded region. (PR #96548)

Michael Kruse via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 25 01:44:01 PDT 2024


https://github.com/Meinersbur commented:

This currently checks for any memory accesses in the expanded blocks, not just unrelated ones. 

Even if it was checking that the expanded blocks only contain unrelated accesses, I wonder whether it is too conservative. E.g.

```c
for (int i = 0; i < n; ++i) 
  B[i] = A[i];
*unrelated=42;
for (int j = 0; j < n; ++j) 
  C[j] = B[j];
```
I think we still want to fuse the loop even though there is an unrelated access in-between.

https://github.com/llvm/llvm-project/pull/96548


More information about the llvm-commits mailing list