[llvm] [DA] Replace delinearization for fixed size array (PR #161822)

Ryotaro Kasuga via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 15 11:20:52 PDT 2025


https://github.com/kasuga-fj commented:

> Looking at the code, looks weirtd that we even have `delinearizeFixedSizeArray` and `tryDelinearizeFixedSizeImpl` which derive the same information, just using different heuristics. Should have been one functions that applies any heuristic that applies.

Correct, there are two functions which provide the same functionality. I think we need to remove `tryDelinearizeFixedSizeImpl` (more precisely, `getIndexExpressionsFromGEP` and the functions that depend on it) since it uses type information in GEPs to drive the heuristic. I believe `tryDelinearizeFixedSizeImpl` can be easily replaced because there's only one other user (LoopCacheAnalysis), which I’m planning to do myself. Removing `getIndexExpressionsFromGEP` is a bit tricky since Polly also uses it... 

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


More information about the llvm-commits mailing list