diff options
author | Ryotaro Kasuga <kasuga.ryotaro@fujitsu.com> | 2025-08-08 19:08:14 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-08-08 19:08:14 +0900 |
commit | bd39ae612547cccef0f5bcc29eea8f355a7b7dd6 (patch) | |
tree | 25ace3a19be20849011fe5a345efc80c0980e65f /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | |
parent | 92f6b15445ecb37db2c160c8645690e7c986ad39 (diff) | |
download | llvm-bd39ae612547cccef0f5bcc29eea8f355a7b7dd6.zip llvm-bd39ae612547cccef0f5bcc29eea8f355a7b7dd6.tar.gz llvm-bd39ae612547cccef0f5bcc29eea8f355a7b7dd6.tar.bz2 |
[Delinearization] Add function for fixed size array without relying on GEP (#145050)
The existing functions `getIndexExpressionsFromGEP` and
`tryDelinearizeFixedSizeImpl` provide functionality to delinearize
memory accesses for fixed size array. They use the GEP source element
type in their optimization heuristics. However, driving optimization
heuristics based on GEP type information is not allowed.
This patch introduces new functions `findFixedSizeArrayDimensions` and
`delinearizeFixedSizeArray` to delinearize a fixed size array without
using the type information in GEP. The new function
`findFixedSizeArrayDimensions` infers the size of each dimension of the
array based on the value to be added to the address as induction
variables are incremented. `delinearizeFixedSizeArray` attempts to
restore the subscripts of each dimension based on the estimated array
size.
This is an initial implementation that may not cover all cases, but is
intended to replace the existing function in the future.
Related:
- https://discourse.llvm.org/t/enabling-loop-interchange/82589/4
-
https://github.com/llvm/llvm-project/pull/124911#issuecomment-2962499501
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
0 files changed, 0 insertions, 0 deletions