[PATCH] D95757: [LV] Replace some uses of VectorLoopValueMap with VPTransformState (NFC)
Gil Rapaport via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 3 10:46:38 PST 2021
gilr added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:4226
+void InnerLoopVectorizer::fixReduction(PHINode *Phi, VPTransformState &State,
+ VPlan &Plan) {
// Get it's reduction variable descriptor.
----------------
We could have VPTransformState hold a pointer to the plan being executed to save passing it separately. What do you think?
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:4452
Value *lastIncomingValue =
- getOrCreateScalarValue(IncomingValue, { UF - 1, LastLane });
+ isa<Instruction>(IncomingValue) &&
+ OrigLoop->contains(cast<Instruction>(IncomingValue))
----------------
Simpler to follow getOrCreateScalarValue() logic?
`...= OrigLoop->isLoopInvariant(IncomingValue)) ? IncomingValue : State.get(...)`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95757/new/
https://reviews.llvm.org/D95757
More information about the llvm-commits
mailing list