[llvm] r314315 - [SLP] fix typos/formatting; NFC
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 27 09:32:56 PDT 2017
Author: spatel
Date: Wed Sep 27 09:32:56 2017
New Revision: 314315
URL: http://llvm.org/viewvc/llvm-project?rev=314315&view=rev
Log:
[SLP] fix typos/formatting; NFC
Modified:
llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp
Modified: llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp?rev=314315&r1=314314&r2=314315&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp (original)
+++ llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp Wed Sep 27 09:32:56 2017
@@ -1436,10 +1436,10 @@ void BoUpSLP::buildTree_rec(ArrayRef<Val
// Check that none of the instructions in the bundle are already in the tree.
for (unsigned i = 0, e = VL.size(); i != e; ++i) {
- auto *I = dyn_cast<Instruction>(VL[i]);
- if (!I)
- continue;
- if (getTreeEntry(I)) {
+ auto *I = dyn_cast<Instruction>(VL[i]);
+ if (!I)
+ continue;
+ if (getTreeEntry(I)) {
DEBUG(dbgs() << "SLP: The instruction (" << *VL[i] <<
") is already in tree.\n");
newTreeEntry(VL, false, UserTreeIdx);
@@ -1447,7 +1447,7 @@ void BoUpSLP::buildTree_rec(ArrayRef<Val
}
}
- // If any of the scalars is marked as a value that needs to stay scalar then
+ // If any of the scalars is marked as a value that needs to stay scalar, then
// we need to gather the scalars.
for (unsigned i = 0, e = VL.size(); i != e; ++i) {
if (MustGather.count(VL[i])) {
@@ -1470,9 +1470,9 @@ void BoUpSLP::buildTree_rec(ArrayRef<Val
return;
}
- // Check that every instructions appears once in this bundle.
+ // Check that every instruction appears once in this bundle.
for (unsigned i = 0, e = VL.size(); i < e; ++i)
- for (unsigned j = i+1; j < e; ++j)
+ for (unsigned j = i + 1; j < e; ++j)
if (VL[i] == VL[j]) {
DEBUG(dbgs() << "SLP: Scalar used twice in bundle.\n");
newTreeEntry(VL, false, UserTreeIdx);
@@ -1480,9 +1480,9 @@ void BoUpSLP::buildTree_rec(ArrayRef<Val
}
auto &BSRef = BlocksSchedules[BB];
- if (!BSRef) {
+ if (!BSRef)
BSRef = llvm::make_unique<BlockScheduling>(BB);
- }
+
BlockScheduling &BS = *BSRef.get();
if (!BS.tryScheduleBundle(VL, this, S.OpValue)) {
@@ -1541,11 +1541,10 @@ void BoUpSLP::buildTree_rec(ArrayRef<Val
}
case Instruction::Load: {
// Check that a vectorized load would load the same memory as a scalar
- // load.
- // For example we don't want vectorize loads that are smaller than 8 bit.
- // Even though we have a packed struct {<i2, i2, i2, i2>} LLVM treats
- // loading/storing it as an i8 struct. If we vectorize loads/stores from
- // such a struct we read/write packed bits disagreeing with the
+ // load. For example, we don't want to vectorize loads that are smaller
+ // than 8-bit. Even though we have a packed struct {<i2, i2, i2, i2>} LLVM
+ // treats loading/storing it as an i8 struct. If we vectorize loads/stores
+ // from such a struct, we read/write packed bits disagreeing with the
// unvectorized version.
Type *ScalarTy = VL0->getType();
More information about the llvm-commits
mailing list