[llvm] [LAA] Check accesses don't overlap early to determine NoDep (PR #92307)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Mon May 20 12:09:07 PDT 2024


fhahn wrote:

> Code as you have it looks correct, but a couple questions:
> 
> * Why the focus on strictly before specifically?  I'd expect strictly after to work as well.  Given that, wouldn't phrasing it as an compile time evaluated overlap check of two regions make the most sense?
> * Unless I'm missing something, the code you added work be correct and precise for scalable types if you used TypeSize.

Originally I thought this would be more difficult, as isKnownPredicate wasn't able to prove (End <= Sink if Sink was an AddRec). But it turns out that if we compute start and end pointers via `getStartAndEndForAccess` factored out in https://github.com/llvm/llvm-project/commit/bce3680f45b57f6ce745cb7da659f2ece745a1d1, isKnownPredicate works as expected.

So I went ahead and updated the PR to use that approach, which overall is slightly simpler and catches more cases. WDYT @preames @Meinersbur 

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


More information about the llvm-commits mailing list