[llvm] [Delinearization] Add function for fixed size array without relying on GEP (PR #145050)

Sjoerd Meijer via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 7 06:18:12 PDT 2025


sjoerdmeijer wrote:

While I am still digesting some parts of this change, here are some high level comments (and possibly nitpicks):
- New function `delinearizeFixedSizeArray` will replace old function `tryDelinearizeFixedSizeImpl`: shall we therefore make the signature the same, i.e. should it at least return a bool upon success/failure of delinearization?
- Shall we rename `delinearizeFixedSizeArray` to `tryDelinearizeFixedSizeImplExperimental`; maybe that makes things more clear/explicit that one is going to replace the other?
- Is there a way we can compare the the new and old delinearization? Or is it too early for that? For example, can we compare the return values where this is used, e.g.:
    ```
    bool TrySrcOld = tryDelinearizeFixedSizeImpl(SE, Src, SrcAccessFn, SrcSubscripts, SrcSizes);
    bool TrySrcNew = tryDelinearizeFixedSizeImplExperimental(SE, Src, SrcAccessFn, SrcSubscripts, SrcSizes);
    assert(TrySrcOld == TrySrcNew && "something");
    ```
- In [this](https://github.com/llvm/llvm-project/pull/144088#discussion_r2145496052) comment for another change you provided another example where DA is not doing the right thing. Is that case handled here too? Is it worth adding this here, or is it exactly the same as one of the other cases?

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


More information about the llvm-commits mailing list