[PATCH] D24511: [LV] Process pointer IVs with PHINodes in collectLoopUniforms
Michael Kuperstein via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 13 09:43:03 PDT 2016
mkuper added inline comments.
================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:5397
@@ +5396,3 @@
+ // True if all users of the pointer operand are memory accesses.
+ auto UsersAreMemAccesses = all_of(Ptr->users(), [&](User *U) -> bool {
+ return isa<LoadInst>(U) || isa<StoreInst>(U);
----------------
Do we care about bitcasts / GEP chains? (I'm ok with being conservative with this, just making sure it's by choice.)
================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:5398
@@ +5397,3 @@
+ auto UsersAreMemAccesses = all_of(Ptr->users(), [&](User *U) -> bool {
+ return isa<LoadInst>(U) || isa<StoreInst>(U);
+ });
----------------
Do we need to check that if U is a store, then Ptr is actually the pointer operand of the store, not the value?
I'm thinking about:
store i32* %p, i32** %q,
Where both %p and %q are consecutive.
================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:5466
@@ +5465,3 @@
+ return I == IndUpdate || !TheLoop->contains(I) || Worklist.count(I) ||
+ isVectorizedMemAccessUse(I, Ind);
+ });
----------------
The only thing that changed here, functionally, is the addition of isVectorizedMemAccessUse right?
The rest is cleanup?
https://reviews.llvm.org/D24511
More information about the llvm-commits
mailing list