summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2017-09-27 16:32:56 +0000
committerSanjay Patel <spatel@rotateright.com>2017-09-27 16:32:56 +0000
commitfee80d5e6583f2f9efebd1fad883371999783bb3 (patch)
tree36ca1d31c7e8c637b97514c2b94687b89016b93d /llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
parent1439fa6236abae2a9b523e54b19d0175175beb2a (diff)
downloadbcm5719-llvm-fee80d5e6583f2f9efebd1fad883371999783bb3.tar.gz
bcm5719-llvm-fee80d5e6583f2f9efebd1fad883371999783bb3.zip
[SLP] fix typos/formatting; NFC
llvm-svn: 314315
Diffstat (limited to 'llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp')
-rw-r--r--llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp27
1 files changed, 13 insertions, 14 deletions
diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
index affe077895e..7f767dcc7d6 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -1436,10 +1436,10 @@ void BoUpSLP::buildTree_rec(ArrayRef<Value *> VL, unsigned Depth,
// 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<Value *> VL, unsigned Depth,
}
}
- // 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<Value *> VL, unsigned Depth,
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<Value *> VL, unsigned Depth,
}
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<Value *> VL, unsigned Depth,
}
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();
OpenPOWER on IntegriCloud