[PATCH] D95676: [VPlan][NFC] Introduce constructors for VPIteration
Sander de Smalen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 2 03:27:24 PST 2021
sdesmalen added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/VPlan.h:101
+
+ VPIteration() : Part(0), Lane(0) {}
+ VPIteration(unsigned Part, unsigned Lane) : Part(Part), Lane(Lane) {}
----------------
>From what I can see, most uses of VPIteration() in this patch are where it explicitly tries to get the first iteration. I think it's better to drop the implicit '0, 0' constructor, so that all VPIteration objects are explicitly constructed with a specific lane and part. Perhaps you can add a named method to return the first lane, e.g.
static VPIteration getFirstLane() { return VPIteration(0, 0); }
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95676/new/
https://reviews.llvm.org/D95676
More information about the llvm-commits
mailing list