[llvm] [polly] [delinearize] Extract array dimensions from alloca and global declarations (PR #156342)
Sebastian Pop via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 1 11:17:33 PDT 2025
sebpop wrote:
> I've not checked the details of this change, but I have a high-level question: Is it allowed to use the type information of `alloca`s and/or global variable to guide optimization heuristics?
Why not? I find this solution more suited than other approaches because we don't have to change LLVM's IR.
There's an alternative solution that requires an RFC to change LLVM IR: see comment on the first patch of the series.
https://github.com/llvm/llvm-project/pull/156215
> The third patch can be rewritten (if alloca's and globals are also going to be scheduled for removal from LLVM IR) to send the data from the front-ends attached to assume(true) statements: [proof of concept to send data from clang / flang with assumes](https://github.com/sebpop/llvm-project/commit/51e0f4fcdef8d213d7af921af728f70140d68032) is still incomplete as it would only send the equivalent of the alloca info, still needs to send info about global vars. This approach would also need some agreement to attach the array_info to the assumes, which changes the LLVM IR.
https://github.com/llvm/llvm-project/pull/156342
More information about the llvm-commits
mailing list