[llvm] r304903 - [CGP] fix formatting in MemCmpExpansion; NFC
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 7 05:44:37 PDT 2017
Author: spatel
Date: Wed Jun 7 07:44:36 2017
New Revision: 304903
URL: http://llvm.org/viewvc/llvm-project?rev=304903&view=rev
Log:
[CGP] fix formatting in MemCmpExpansion; NFC
Modified:
llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp
Modified: llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp?rev=304903&r1=304902&r2=304903&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp (original)
+++ llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp Wed Jun 7 07:44:36 2017
@@ -1742,7 +1742,7 @@ void MemCmpExpansion::createResultBlock(
}
// This function creates the IR instructions for loading and comparing 1 byte.
-// It loads 1 byte from each source of the memcmp paramters with the given
+// It loads 1 byte from each source of the memcmp parameters with the given
// GEPIndex. It then subtracts the two loaded values and adds this result to the
// final phi node for selecting the memcmp result.
void MemCmpExpansion::emitLoadCompareByteBlock(unsigned Index, int GEPIndex) {
@@ -2016,17 +2016,17 @@ void MemCmpExpansion::emitMemCmpResultBl
int MemCmpExpansion::calculateNumBlocks(unsigned Size) {
int NumBlocks = 0;
- bool haveOneByteLoad = false;
+ bool HaveOneByteLoad = false;
unsigned RemainingSize = Size;
unsigned LoadSize = MaxLoadSize;
while (RemainingSize) {
if (LoadSize == 1)
- haveOneByteLoad = true;
+ HaveOneByteLoad = true;
NumBlocks += RemainingSize / LoadSize;
RemainingSize = RemainingSize % LoadSize;
LoadSize = LoadSize / 2;
}
- NumBlocksNonOneByte = haveOneByteLoad ? (NumBlocks - 1) : NumBlocks;
+ NumBlocksNonOneByte = HaveOneByteLoad ? (NumBlocks - 1) : NumBlocks;
if (IsUsedForZeroCmp)
NumBlocks = NumBlocks / NumLoadsPerBlock +
@@ -2057,9 +2057,8 @@ Value *MemCmpExpansion::getMemCmpExpansi
unsigned NumBytesProcessed = 0;
// This loop populates each of the LoadCmpBlocks with the IR sequence to
// handle multiple loads per block.
- for (unsigned i = 0; i < NumBlocks; ++i) {
+ for (unsigned i = 0; i < NumBlocks; ++i)
emitLoadCompareBlockMultipleLoads(i, Size, NumBytesProcessed);
- }
emitMemCmpResultBlock(IsLittleEndian);
return PhiRes;
@@ -2075,9 +2074,8 @@ Value *MemCmpExpansion::getMemCmpExpansi
int LoadSize = MaxLoadSize;
int NumBytesToBeProcessed = Size;
- if (IsUsedForZeroCmp) {
+ if (IsUsedForZeroCmp)
return getMemCmpExpansionZeroCase(Size, IsLittleEndian);
- }
unsigned Index = 0;
// This loop calls emitLoadCompareBlock for comparing SizeVal bytes of the two
More information about the llvm-commits
mailing list