[llvm] [SROA] Pre-split overlapping move slices within a partition (PR #210061)
Yonah Goldberg via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 14 15:05:31 PDT 2026
================
@@ -4867,7 +4904,9 @@ bool SROA::presplitLoadsAndStores(AllocaInst &AI, AllocaSlices &AS) {
for (auto &P : AS.partitions()) {
for (Slice &S : P) {
Instruction *I = cast<Instruction>(S.getUse()->getUser());
- if (!S.isSplittable() || S.endOffset() <= P.endOffset()) {
+ bool ExtendsPastPartitionEnd = S.endOffset() > P.endOffset();
+ Slice *CopyOverlap = findOverlappingCopySlice(S, P);
----------------
YonahGoldberg wrote:
Do you think its better to not be quadratic over the number of slices in the partition? You could get around this with a `DenseMap` from an instruction to the slice associated with that instruction.
https://github.com/llvm/llvm-project/pull/210061
More information about the llvm-commits
mailing list