From c4d738472bdb1394cdebe5a4623eba5eb2adf447 Mon Sep 17 00:00:00 2001 From: Sanjay Patel Date: Wed, 27 Sep 2017 16:32:56 +0000 Subject: [PATCH] [SLP] fix typos/formatting; NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314315 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Vectorize/SLPVectorizer.cpp | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/lib/Transforms/Vectorize/SLPVectorizer.cpp b/lib/Transforms/Vectorize/SLPVectorizer.cpp index affe077895e..7f767dcc7d6 100644 --- a/lib/Transforms/Vectorize/SLPVectorizer.cpp +++ b/lib/Transforms/Vectorize/SLPVectorizer.cpp @@ -1436,10 +1436,10 @@ void BoUpSLP::buildTree_rec(ArrayRef 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(VL[i]); - if (!I) - continue; - if (getTreeEntry(I)) { + auto *I = dyn_cast(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 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 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 VL, unsigned Depth, } auto &BSRef = BlocksSchedules[BB]; - if (!BSRef) { + if (!BSRef) BSRef = llvm::make_unique(BB); - } + BlockScheduling &BS = *BSRef.get(); if (!BS.tryScheduleBundle(VL, this, S.OpValue)) { @@ -1541,11 +1541,10 @@ void BoUpSLP::buildTree_rec(ArrayRef 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 {} 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 {} 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(); -- 2.11.0