[llvm] [LAA][LV]Allow recognition of strided pointers with constant stride (PR #171151)
John Brawn via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 2 06:24:54 PST 2026
john-brawn-arm wrote:
Currently in setCostBasedWideningDecision there's a call to memoryInstructionCanBeWidened that has a call chain
memoryInstructionCanBeWidened -> isConsecutivePtr -> getPtrStride -> getStrideFromAddRec
You've added after that a call to stridedMemoryAccessCanBeWidened where the call chain is
stridedMemoryAccessCanBeWidened -> isConstRuntimeStridedPtr -> getPtrConstRuntimeStride -> getStrideFromAddRec
These functions are very similar to the ones above, e.g. stridedMemoryAccessCanBeWidened looks identical to memoryInstructionCanBeWidened except that it calls isConstRuntimeStridedPtr instead of isConsecutivePtr. It looks like you can probably remove these functions and instead modify their counterparts to pass through AllowStridedPtrs down to getStrideFromAddRec.
https://github.com/llvm/llvm-project/pull/171151
More information about the llvm-commits
mailing list