[PATCH] D112077: [NFC][LoopIdiom] Make for loops more readable
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 19 10:06:57 PDT 2021
craig.topper added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp:667
SmallVector<unsigned, 16> IndexQueue;
- for (unsigned i = 0, e = SL.size(); i < e; ++i) {
+ for (auto i = 0LU, e = SL.size(); i < e; ++i) {
assert(SL[i]->isSimple() && "Expected only non-volatile stores.");
----------------
yurai007 wrote:
> That could be simplified a bit with 'seq' but extra headers need to included, so decided leave it as it is.
I don't find this more readable.
I'm not sure what the L in LU was supposed to do. long is 32-bits on 64-bit Windows so if you were trying to make it the same size as size_t to match the return type of SL.size(), it didn't work.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112077/new/
https://reviews.llvm.org/D112077
More information about the llvm-commits
mailing list