[PATCH] D32998: [SROA] enable splitting for non-whole-alloca loads and stores
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 18 10:54:38 PDT 2017
rnk added inline comments.
================
Comment at: lib/Transforms/Scalar/SROA.cpp:3978
continue;
- // FIXME: We currently leave whole-alloca splittable loads and stores. This
- // used to be the only splittable loads and stores and we need to be
- // confident that the above handling of splittable loads and stores is
- // completely sufficient before we forcibly disable the remaining handling.
- if (S.beginOffset() == 0 &&
- S.endOffset() >= DL.getTypeAllocSize(AI.getAllocatedType()))
- continue;
+ if (all_of(AS, [S](Slice &S2) {
+ if (S == S2) return true;
----------------
Does this have to be n^2 in the number of slices? Can't you leverage the sorting to be more efficient?
================
Comment at: test/Transforms/SROA/basictest.ll:1707-1709
+; CHECK %[[shift:.*]] = lshr i64 %v, 32
+; CHECK-next %{{.*}} = trunc i64 %[[shift]] to i32
+; CHECK-next ret void
----------------
These CHECKs have no colon, they aren't firing.
https://reviews.llvm.org/D32998
More information about the llvm-commits
mailing list