[llvm] r336194 - [IR] Strip trailing whitespace. NFC
Bjorn Pettersson via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 3 05:39:52 PDT 2018
Author: bjope
Date: Tue Jul 3 05:39:52 2018
New Revision: 336194
URL: http://llvm.org/viewvc/llvm-project?rev=336194&view=rev
Log:
[IR] Strip trailing whitespace. NFC
Modified:
llvm/trunk/lib/IR/ConstantRange.cpp
llvm/trunk/lib/IR/Constants.cpp
llvm/trunk/lib/IR/DebugInfo.cpp
llvm/trunk/lib/IR/DebugInfoMetadata.cpp
llvm/trunk/lib/IR/IRBuilder.cpp
llvm/trunk/lib/IR/LegacyPassManager.cpp
llvm/trunk/lib/IR/Type.cpp
Modified: llvm/trunk/lib/IR/ConstantRange.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/ConstantRange.cpp?rev=336194&r1=336193&r2=336194&view=diff
==============================================================================
--- llvm/trunk/lib/IR/ConstantRange.cpp (original)
+++ llvm/trunk/lib/IR/ConstantRange.cpp Tue Jul 3 05:39:52 2018
@@ -416,7 +416,7 @@ bool ConstantRange::contains(const Const
ConstantRange ConstantRange::subtract(const APInt &Val) const {
assert(Val.getBitWidth() == getBitWidth() && "Wrong bit width");
// If the set is empty or full, don't modify the endpoints.
- if (Lower == Upper)
+ if (Lower == Upper)
return *this;
return ConstantRange(Lower - Val, Upper - Val);
}
@@ -426,7 +426,7 @@ ConstantRange ConstantRange::difference(
}
ConstantRange ConstantRange::intersectWith(const ConstantRange &CR) const {
- assert(getBitWidth() == CR.getBitWidth() &&
+ assert(getBitWidth() == CR.getBitWidth() &&
"ConstantRange types don't agree!");
// Handle common cases.
@@ -500,7 +500,7 @@ ConstantRange ConstantRange::intersectWi
}
ConstantRange ConstantRange::unionWith(const ConstantRange &CR) const {
- assert(getBitWidth() == CR.getBitWidth() &&
+ assert(getBitWidth() == CR.getBitWidth() &&
"ConstantRange types don't agree!");
if ( isFullSet() || CR.isEmptySet()) return *this;
@@ -854,7 +854,7 @@ ConstantRange::multiply(const ConstantRa
this_max = getSignedMax().sext(getBitWidth() * 2);
Other_min = Other.getSignedMin().sext(getBitWidth() * 2);
Other_max = Other.getSignedMax().sext(getBitWidth() * 2);
-
+
auto L = {this_min * Other_min, this_min * Other_max,
this_max * Other_min, this_max * Other_max};
auto Compare = [](const APInt &A, const APInt &B) { return A.slt(B); };
Modified: llvm/trunk/lib/IR/Constants.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Constants.cpp?rev=336194&r1=336193&r2=336194&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Constants.cpp (original)
+++ llvm/trunk/lib/IR/Constants.cpp Tue Jul 3 05:39:52 2018
@@ -709,7 +709,7 @@ Constant *ConstantFP::get(Type *Ty, Stri
if (VectorType *VTy = dyn_cast<VectorType>(Ty))
return ConstantVector::getSplat(VTy->getNumElements(), C);
- return C;
+ return C;
}
Constant *ConstantFP::getNaN(Type *Ty, bool Negative, unsigned Type) {
@@ -762,7 +762,7 @@ ConstantFP* ConstantFP::get(LLVMContext
else if (&V.getSemantics() == &APFloat::IEEEquad())
Ty = Type::getFP128Ty(Context);
else {
- assert(&V.getSemantics() == &APFloat::PPCDoubleDouble() &&
+ assert(&V.getSemantics() == &APFloat::PPCDoubleDouble() &&
"Unknown FP format");
Ty = Type::getPPC_FP128Ty(Context);
}
@@ -1015,7 +1015,7 @@ Constant *ConstantStruct::get(StructType
// Create a ConstantAggregateZero value if all elements are zeros.
bool isZero = true;
bool isUndef = false;
-
+
if (!V.empty()) {
isUndef = isa<UndefValue>(V[0]);
isZero = V[0]->isNullValue();
@@ -1276,17 +1276,17 @@ bool ConstantFP::isValueValidForType(Typ
}
case Type::X86_FP80TyID:
return &Val2.getSemantics() == &APFloat::IEEEhalf() ||
- &Val2.getSemantics() == &APFloat::IEEEsingle() ||
+ &Val2.getSemantics() == &APFloat::IEEEsingle() ||
&Val2.getSemantics() == &APFloat::IEEEdouble() ||
&Val2.getSemantics() == &APFloat::x87DoubleExtended();
case Type::FP128TyID:
return &Val2.getSemantics() == &APFloat::IEEEhalf() ||
- &Val2.getSemantics() == &APFloat::IEEEsingle() ||
+ &Val2.getSemantics() == &APFloat::IEEEsingle() ||
&Val2.getSemantics() == &APFloat::IEEEdouble() ||
&Val2.getSemantics() == &APFloat::IEEEquad();
case Type::PPC_FP128TyID:
return &Val2.getSemantics() == &APFloat::IEEEhalf() ||
- &Val2.getSemantics() == &APFloat::IEEEsingle() ||
+ &Val2.getSemantics() == &APFloat::IEEEsingle() ||
&Val2.getSemantics() == &APFloat::IEEEdouble() ||
&Val2.getSemantics() == &APFloat::PPCDoubleDouble();
}
@@ -1795,8 +1795,8 @@ Constant *ConstantExpr::get(unsigned Opc
"Tried to create a floating-point operation on a "
"non-floating-point type!");
break;
- case Instruction::UDiv:
- case Instruction::SDiv:
+ case Instruction::UDiv:
+ case Instruction::SDiv:
assert(C1->getType() == C2->getType() && "Op types should be identical!");
assert(C1->getType()->isIntOrIntVectorTy() &&
"Tried to create an arithmetic operation on a non-arithmetic type!");
@@ -1806,8 +1806,8 @@ Constant *ConstantExpr::get(unsigned Opc
assert(C1->getType()->isFPOrFPVectorTy() &&
"Tried to create an arithmetic operation on a non-arithmetic type!");
break;
- case Instruction::URem:
- case Instruction::SRem:
+ case Instruction::URem:
+ case Instruction::SRem:
assert(C1->getType() == C2->getType() && "Op types should be identical!");
assert(C1->getType()->isIntOrIntVectorTy() &&
"Tried to create an arithmetic operation on a non-arithmetic type!");
@@ -1855,7 +1855,7 @@ Constant *ConstantExpr::getSizeOf(Type*
Constant *GEPIdx = ConstantInt::get(Type::getInt32Ty(Ty->getContext()), 1);
Constant *GEP = getGetElementPtr(
Ty, Constant::getNullValue(PointerType::getUnqual(Ty)), GEPIdx);
- return getPtrToInt(GEP,
+ return getPtrToInt(GEP,
Type::getInt64Ty(Ty->getContext()));
}
@@ -2416,7 +2416,7 @@ Constant *ConstantDataSequential::getImp
void ConstantDataSequential::destroyConstantImpl() {
// Remove the constant from the StringMap.
- StringMap<ConstantDataSequential*> &CDSConstants =
+ StringMap<ConstantDataSequential*> &CDSConstants =
getType()->getContext().pImpl->CDSConstants;
StringMap<ConstantDataSequential*>::iterator Slot =
@@ -2433,7 +2433,7 @@ void ConstantDataSequential::destroyCons
assert((*Entry) == this && "Hash mismatch in ConstantDataSequential");
getContext().pImpl->CDSConstants.erase(Slot);
} else {
- // Otherwise, there are multiple entries linked off the bucket, unlink the
+ // Otherwise, there are multiple entries linked off the bucket, unlink the
// node we care about but keep the bucket around.
for (ConstantDataSequential *Node = *Entry; ;
Entry = &Node->Next, Node = *Entry) {
Modified: llvm/trunk/lib/IR/DebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DebugInfo.cpp?rev=336194&r1=336193&r2=336194&view=diff
==============================================================================
--- llvm/trunk/lib/IR/DebugInfo.cpp (original)
+++ llvm/trunk/lib/IR/DebugInfo.cpp Tue Jul 3 05:39:52 2018
@@ -669,10 +669,10 @@ bool llvm::stripNonLineTableDebugInfo(Mo
SmallVector<MDNode *, 8> Ops;
for (MDNode *Op : NMD.operands())
Ops.push_back(remap(Op));
-
+
if (!Changed)
continue;
-
+
NMD.clearOperands();
for (auto *Op : Ops)
if (Op)
Modified: llvm/trunk/lib/IR/DebugInfoMetadata.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DebugInfoMetadata.cpp?rev=336194&r1=336193&r2=336194&view=diff
==============================================================================
--- llvm/trunk/lib/IR/DebugInfoMetadata.cpp (original)
+++ llvm/trunk/lib/IR/DebugInfoMetadata.cpp Tue Jul 3 05:39:52 2018
@@ -792,7 +792,7 @@ DIExpression *DIExpression::prepend(cons
SmallVector<uint64_t, 8> Ops;
if (DerefBefore)
Ops.push_back(dwarf::DW_OP_deref);
-
+
appendOffset(Ops, Offset);
if (DerefAfter)
Ops.push_back(dwarf::DW_OP_deref);
Modified: llvm/trunk/lib/IR/IRBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/IRBuilder.cpp?rev=336194&r1=336193&r2=336194&view=diff
==============================================================================
--- llvm/trunk/lib/IR/IRBuilder.cpp (original)
+++ llvm/trunk/lib/IR/IRBuilder.cpp Tue Jul 3 05:39:52 2018
@@ -62,7 +62,7 @@ Value *IRBuilderBase::getCastedInt8PtrVa
auto *PT = cast<PointerType>(Ptr->getType());
if (PT->getElementType()->isIntegerTy(8))
return Ptr;
-
+
// Otherwise, we need to insert a bitcast.
PT = getInt8PtrTy(PT->getAddressSpace());
BitCastInst *BCI = new BitCastInst(Ptr, PT, "");
@@ -80,7 +80,7 @@ static CallInst *createCallHelper(Value
CI->copyFastMathFlags(FMFSource);
Builder->GetInsertBlock()->getInstList().insert(Builder->GetInsertPoint(),CI);
Builder->SetInstDebugLocation(CI);
- return CI;
+ return CI;
}
static InvokeInst *createInvokeHelper(Value *Invokee, BasicBlock *NormalDest,
@@ -105,7 +105,7 @@ CreateMemSet(Value *Ptr, Value *Val, Val
Type *Tys[] = { Ptr->getType(), Size->getType() };
Module *M = BB->getParent()->getParent();
Value *TheFn = Intrinsic::getDeclaration(M, Intrinsic::memset, Tys);
-
+
CallInst *CI = createCallHelper(TheFn, Ops, this);
if (Align > 0)
@@ -117,7 +117,7 @@ CreateMemSet(Value *Ptr, Value *Val, Val
if (ScopeTag)
CI->setMetadata(LLVMContext::MD_alias_scope, ScopeTag);
-
+
if (NoAliasTag)
CI->setMetadata(LLVMContext::MD_noalias, NoAliasTag);
@@ -167,7 +167,7 @@ CreateMemCpy(Value *Dst, unsigned DstAli
Type *Tys[] = { Dst->getType(), Src->getType(), Size->getType() };
Module *M = BB->getParent()->getParent();
Value *TheFn = Intrinsic::getDeclaration(M, Intrinsic::memcpy, Tys);
-
+
CallInst *CI = createCallHelper(TheFn, Ops, this);
auto* MCI = cast<MemCpyInst>(CI);
@@ -183,14 +183,14 @@ CreateMemCpy(Value *Dst, unsigned DstAli
// Set the TBAA Struct info if present.
if (TBAAStructTag)
CI->setMetadata(LLVMContext::MD_tbaa_struct, TBAAStructTag);
-
+
if (ScopeTag)
CI->setMetadata(LLVMContext::MD_alias_scope, ScopeTag);
-
+
if (NoAliasTag)
CI->setMetadata(LLVMContext::MD_noalias, NoAliasTag);
- return CI;
+ return CI;
}
CallInst *IRBuilderBase::CreateElementUnorderedAtomicMemCpy(
@@ -247,7 +247,7 @@ CreateMemMove(Value *Dst, unsigned DstAl
Type *Tys[] = { Dst->getType(), Src->getType(), Size->getType() };
Module *M = BB->getParent()->getParent();
Value *TheFn = Intrinsic::getDeclaration(M, Intrinsic::memmove, Tys);
-
+
CallInst *CI = createCallHelper(TheFn, Ops, this);
auto *MMI = cast<MemMoveInst>(CI);
@@ -259,14 +259,14 @@ CreateMemMove(Value *Dst, unsigned DstAl
// Set the TBAA info if present.
if (TBAATag)
CI->setMetadata(LLVMContext::MD_tbaa, TBAATag);
-
+
if (ScopeTag)
CI->setMetadata(LLVMContext::MD_alias_scope, ScopeTag);
-
+
if (NoAliasTag)
CI->setMetadata(LLVMContext::MD_noalias, NoAliasTag);
-
- return CI;
+
+ return CI;
}
CallInst *IRBuilderBase::CreateElementUnorderedAtomicMemMove(
Modified: llvm/trunk/lib/IR/LegacyPassManager.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/LegacyPassManager.cpp?rev=336194&r1=336193&r2=336194&view=diff
==============================================================================
--- llvm/trunk/lib/IR/LegacyPassManager.cpp (original)
+++ llvm/trunk/lib/IR/LegacyPassManager.cpp Tue Jul 3 05:39:52 2018
@@ -648,7 +648,7 @@ AnalysisUsage *PMTopLevelManager::findAn
// of dependencies.
AnalysisUsage AU;
P->getAnalysisUsage(AU);
-
+
AUFoldingSetNode* Node = nullptr;
FoldingSetNodeID ID;
AUFoldingSetNode::Profile(ID, AU);
Modified: llvm/trunk/lib/IR/Type.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Type.cpp?rev=336194&r1=336193&r2=336194&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Type.cpp (original)
+++ llvm/trunk/lib/IR/Type.cpp Tue Jul 3 05:39:52 2018
@@ -60,9 +60,9 @@ bool Type::isIntegerTy(unsigned Bitwidth
bool Type::canLosslesslyBitCastTo(Type *Ty) const {
// Identity cast means no change so return true
- if (this == Ty)
+ if (this == Ty)
return true;
-
+
// They are not convertible unless they are at least first class types
if (!this->isFirstClassType() || !Ty->isFirstClassType())
return false;
@@ -240,7 +240,7 @@ PointerType *Type::getInt64PtrTy(LLVMCon
IntegerType *IntegerType::get(LLVMContext &C, unsigned NumBits) {
assert(NumBits >= MIN_INT_BITS && "bitwidth too small");
assert(NumBits <= MAX_INT_BITS && "bitwidth too large");
-
+
// Check for the built-in integer types
switch (NumBits) {
case 1: return cast<IntegerType>(Type::getInt1Ty(C));
@@ -252,12 +252,12 @@ IntegerType *IntegerType::get(LLVMContex
default:
break;
}
-
+
IntegerType *&Entry = C.pImpl->IntegerTypes[NumBits];
if (!Entry)
Entry = new (C.pImpl->TypeAllocator) IntegerType(C, NumBits);
-
+
return Entry;
}
@@ -333,7 +333,7 @@ bool FunctionType::isValidArgumentType(T
// Primitive Constructors.
-StructType *StructType::get(LLVMContext &Context, ArrayRef<Type*> ETypes,
+StructType *StructType::get(LLVMContext &Context, ArrayRef<Type*> ETypes,
bool isPacked) {
LLVMContextImpl *pImpl = Context.pImpl;
AnonStructTypeKeyInfo::KeyTy Key(ETypes, isPacked);
@@ -355,7 +355,7 @@ StructType *StructType::get(LLVMContext
void StructType::setBody(ArrayRef<Type*> Elements, bool isPacked) {
assert(isOpaque() && "Struct body already set!");
-
+
setSubclassData(getSubclassData() | SCDB_HasBody);
if (isPacked)
setSubclassData(getSubclassData() | SCDB_Packed);
@@ -391,7 +391,7 @@ void StructType::setName(StringRef Name)
}
return;
}
-
+
// Look up the entry for the name.
auto IterBool =
getContext().pImpl->NamedStructTypes.insert(std::make_pair(Name, this));
@@ -402,7 +402,7 @@ void StructType::setName(StringRef Name)
TempStr.push_back('.');
raw_svector_ostream TmpStream(TempStr);
unsigned NameSize = Name.size();
-
+
do {
TempStr.resize(NameSize + 1);
TmpStream << getContext().pImpl->NamedStructTypesUniqueID++;
@@ -569,7 +569,7 @@ ArrayType *ArrayType::get(Type *ElementT
assert(isValidElementType(ElementType) && "Invalid type for array element!");
LLVMContextImpl *pImpl = ElementType->getContext().pImpl;
- ArrayType *&Entry =
+ ArrayType *&Entry =
pImpl->ArrayTypes[std::make_pair(ElementType, NumElements)];
if (!Entry)
@@ -617,9 +617,9 @@ bool VectorType::isValidElementType(Type
PointerType *PointerType::get(Type *EltTy, unsigned AddressSpace) {
assert(EltTy && "Can't get a pointer to <null> type!");
assert(isValidElementType(EltTy) && "Invalid type for pointer element!");
-
+
LLVMContextImpl *CImpl = EltTy->getContext().pImpl;
-
+
// Since AddressSpace #0 is the common case, we special case it.
PointerType *&Entry = AddressSpace == 0 ? CImpl->PointerTypes[EltTy]
: CImpl->ASPointerTypes[std::make_pair(EltTy, AddressSpace)];
More information about the llvm-commits
mailing list