[all-commits] [llvm/llvm-project] bd39ae: [Delinearization] Add function for fixed size arra...

Ryotaro Kasuga via All-commits all-commits at lists.llvm.org
Fri Aug 8 03:08:35 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bd39ae612547cccef0f5bcc29eea8f355a7b7dd6
      https://github.com/llvm/llvm-project/commit/bd39ae612547cccef0f5bcc29eea8f355a7b7dd6
  Author: Ryotaro Kasuga <kasuga.ryotaro at fujitsu.com>
  Date:   2025-08-08 (Fri, 08 Aug 2025)

  Changed paths:
    M llvm/include/llvm/Analysis/Delinearization.h
    M llvm/lib/Analysis/Delinearization.cpp
    A llvm/test/Analysis/Delinearization/fixed_size_array.ll

  Log Message:
  -----------
  [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



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list