Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

Commit f06c707

Browse files
committed
Repace SmallPtrSet with SmallPtrSetImpl in function arguments to avoid needing to mention the size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215868 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 6de46b5 commit f06c707

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+114
-114
lines changed

include/llvm/Analysis/IVUsers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ class IVUsers : public LoopPass {
174174
/// dump - This method is used for debugging.
175175
void dump() const;
176176
protected:
177-
bool AddUsersImpl(Instruction *I, SmallPtrSet<Loop*,16> &SimpleLoopNests);
177+
bool AddUsersImpl(Instruction *I, SmallPtrSetImpl<Loop*> &SimpleLoopNests);
178178
};
179179

180180
Pass *createIVUsersPass();

include/llvm/CodeGen/LexicalScopes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ class LexicalScopes {
163163
/// which have machine instructions that belong to lexical scope identified by
164164
/// DebugLoc.
165165
void getMachineBasicBlocks(DebugLoc DL,
166-
SmallPtrSet<const MachineBasicBlock *, 4> &MBBs);
166+
SmallPtrSetImpl<const MachineBasicBlock *> &MBBs);
167167

168168
/// dominates - Return true if DebugLoc's lexical scope dominates at least one
169169
/// machine instruction's lexical scope in a given machine basic block.

include/llvm/CodeGen/SelectionDAGNodes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ class SDNode : public FoldingSetNode, public ilist_node<SDNode> {
594594
/// changes.
595595
/// NOTE: This is still very expensive. Use carefully.
596596
bool hasPredecessorHelper(const SDNode *N,
597-
SmallPtrSet<const SDNode *, 32> &Visited,
597+
SmallPtrSetImpl<const SDNode *> &Visited,
598598
SmallVectorImpl<const SDNode *> &Worklist) const;
599599

600600
/// getNumOperands - Return the number of values used by this operation.

include/llvm/IR/DerivedTypes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ class StructType : public CompositeType {
249249
bool isOpaque() const { return (getSubclassData() & SCDB_HasBody) == 0; }
250250

251251
/// isSized - Return true if this is a sized type.
252-
bool isSized(SmallPtrSet<const Type*, 4> *Visited = nullptr) const;
252+
bool isSized(SmallPtrSetImpl<const Type*> *Visited = nullptr) const;
253253

254254
/// hasName - Return true if this is a named struct that has a non-empty name.
255255
bool hasName() const { return SymbolTableEntry != nullptr; }

include/llvm/IR/Type.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ class Type {
265265
/// get the actual size for a particular target, it is reasonable to use the
266266
/// DataLayout subsystem to do this.
267267
///
268-
bool isSized(SmallPtrSet<const Type*, 4> *Visited = nullptr) const {
268+
bool isSized(SmallPtrSetImpl<const Type*> *Visited = nullptr) const {
269269
// If it's a primitive, it is always sized.
270270
if (getTypeID() == IntegerTyID || isFloatingPointTy() ||
271271
getTypeID() == PointerTyID ||
@@ -419,7 +419,7 @@ class Type {
419419
/// isSizedDerivedType - Derived types like structures and arrays are sized
420420
/// iff all of the members of the type are sized as well. Since asking for
421421
/// their size is relatively uncommon, move this operation out of line.
422-
bool isSizedDerivedType(SmallPtrSet<const Type*, 4> *Visited = nullptr) const;
422+
bool isSizedDerivedType(SmallPtrSetImpl<const Type*> *Visited = nullptr) const;
423423
};
424424

425425
// Printing of types.

include/llvm/LTO/LTOCodeGenerator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ struct LTOCodeGenerator {
124124
void applyScopeRestrictions();
125125
void applyRestriction(GlobalValue &GV, const ArrayRef<StringRef> &Libcalls,
126126
std::vector<const char *> &MustPreserveList,
127-
SmallPtrSet<GlobalValue *, 8> &AsmUsed,
127+
SmallPtrSetImpl<GlobalValue *> &AsmUsed,
128128
Mangler &Mangler);
129129
bool determineTarget(std::string &errMsg);
130130

include/llvm/Transforms/Utils/ModuleUtils.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class Module;
2020
class Function;
2121
class GlobalValue;
2222
class GlobalVariable;
23-
template <class PtrType, unsigned SmallSize> class SmallPtrSet;
23+
template <class PtrType> class SmallPtrSetImpl;
2424

2525
/// Append F to the list of global ctors of module M with the given Priority.
2626
/// This wraps the function in the appropriate structure and stores it along
@@ -34,7 +34,7 @@ void appendToGlobalDtors(Module &M, Function *F, int Priority);
3434
/// \brief Given "llvm.used" or "llvm.compiler.used" as a global name, collect
3535
/// the initializer elements of that global in Set and return the global itself.
3636
GlobalVariable *collectUsedGlobalVariables(Module &M,
37-
SmallPtrSet<GlobalValue *, 8> &Set,
37+
SmallPtrSetImpl<GlobalValue *> &Set,
3838
bool CompilerUsed);
3939
} // End llvm namespace
4040

lib/Analysis/ConstantFolding.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -967,7 +967,7 @@ Constant *llvm::ConstantFoldInstruction(Instruction *I,
967967
static Constant *
968968
ConstantFoldConstantExpressionImpl(const ConstantExpr *CE, const DataLayout *TD,
969969
const TargetLibraryInfo *TLI,
970-
SmallPtrSet<ConstantExpr *, 4> &FoldedOps) {
970+
SmallPtrSetImpl<ConstantExpr *> &FoldedOps) {
971971
SmallVector<Constant *, 8> Ops;
972972
for (User::const_op_iterator i = CE->op_begin(), e = CE->op_end(); i != e;
973973
++i) {

lib/Analysis/IVUsers.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ static bool isInteresting(const SCEV *S, const Instruction *I, const Loop *L,
8484
/// form.
8585
static bool isSimplifiedLoopNest(BasicBlock *BB, const DominatorTree *DT,
8686
const LoopInfo *LI,
87-
SmallPtrSet<Loop*,16> &SimpleLoopNests) {
87+
SmallPtrSetImpl<Loop*> &SimpleLoopNests) {
8888
Loop *NearestLoop = nullptr;
8989
for (DomTreeNode *Rung = DT->getNode(BB);
9090
Rung; Rung = Rung->getIDom()) {
@@ -112,7 +112,7 @@ static bool isSimplifiedLoopNest(BasicBlock *BB, const DominatorTree *DT,
112112
/// reducible SCEV, recursively add its users to the IVUsesByStride set and
113113
/// return true. Otherwise, return false.
114114
bool IVUsers::AddUsersImpl(Instruction *I,
115-
SmallPtrSet<Loop*,16> &SimpleLoopNests) {
115+
SmallPtrSetImpl<Loop*> &SimpleLoopNests) {
116116
// Add this IV user to the Processed set before returning false to ensure that
117117
// all IV users are members of the set. See IVUsers::isIVUserOrOperand.
118118
if (!Processed.insert(I))

lib/Analysis/Lint.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ namespace {
9696

9797
Value *findValue(Value *V, bool OffsetOk) const;
9898
Value *findValueImpl(Value *V, bool OffsetOk,
99-
SmallPtrSet<Value *, 4> &Visited) const;
99+
SmallPtrSetImpl<Value *> &Visited) const;
100100

101101
public:
102102
Module *Mod;
@@ -622,7 +622,7 @@ Value *Lint::findValue(Value *V, bool OffsetOk) const {
622622

623623
/// findValueImpl - Implementation helper for findValue.
624624
Value *Lint::findValueImpl(Value *V, bool OffsetOk,
625-
SmallPtrSet<Value *, 4> &Visited) const {
625+
SmallPtrSetImpl<Value *> &Visited) const {
626626
// Detect self-referential values.
627627
if (!Visited.insert(V))
628628
return UndefValue::get(V->getType());

lib/Analysis/ValueTracking.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1833,7 +1833,7 @@ bool llvm::getConstantStringInfo(const Value *V, StringRef &Str,
18331833

18341834
/// GetStringLengthH - If we can compute the length of the string pointed to by
18351835
/// the specified pointer, return 'len+1'. If we can't, return 0.
1836-
static uint64_t GetStringLengthH(Value *V, SmallPtrSet<PHINode*, 32> &PHIs) {
1836+
static uint64_t GetStringLengthH(Value *V, SmallPtrSetImpl<PHINode*> &PHIs) {
18371837
// Look through noop bitcast instructions.
18381838
V = V->stripPointerCasts();
18391839

lib/CodeGen/AsmPrinter/DwarfDebug.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1149,7 +1149,7 @@ bool DwarfDebug::addCurrentFnArgument(DbgVariable *Var, LexicalScope *Scope) {
11491149

11501150
// Collect variable information from side table maintained by MMI.
11511151
void DwarfDebug::collectVariableInfoFromMMITable(
1152-
SmallPtrSet<const MDNode *, 16> &Processed) {
1152+
SmallPtrSetImpl<const MDNode *> &Processed) {
11531153
for (const auto &VI : MMI->getVariableDbgInfo()) {
11541154
if (!VI.Var)
11551155
continue;
@@ -1308,7 +1308,7 @@ DwarfDebug::buildLocationList(SmallVectorImpl<DebugLocEntry> &DebugLoc,
13081308

13091309
// Find variables for each lexical scope.
13101310
void
1311-
DwarfDebug::collectVariableInfo(SmallPtrSet<const MDNode *, 16> &Processed) {
1311+
DwarfDebug::collectVariableInfo(SmallPtrSetImpl<const MDNode *> &Processed) {
13121312
LexicalScope *FnScope = LScopes.getCurrentFunctionScope();
13131313
DwarfCompileUnit *TheCU = SPMap.lookup(FnScope->getScopeNode());
13141314

lib/CodeGen/AsmPrinter/DwarfDebug.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ class DwarfDebug : public AsmPrinterHandler {
533533
bool addCurrentFnArgument(DbgVariable *Var, LexicalScope *Scope);
534534

535535
/// \brief Populate LexicalScope entries with variables' info.
536-
void collectVariableInfo(SmallPtrSet<const MDNode *, 16> &ProcessedVars);
536+
void collectVariableInfo(SmallPtrSetImpl<const MDNode *> &ProcessedVars);
537537

538538
/// \brief Build the location list for all DBG_VALUEs in the
539539
/// function that describe the same variable.
@@ -542,7 +542,7 @@ class DwarfDebug : public AsmPrinterHandler {
542542

543543
/// \brief Collect variable information from the side table maintained
544544
/// by MMI.
545-
void collectVariableInfoFromMMITable(SmallPtrSet<const MDNode *, 16> &P);
545+
void collectVariableInfoFromMMITable(SmallPtrSetImpl<const MDNode *> &P);
546546

547547
/// \brief Ensure that a label will be emitted before MI.
548548
void requestLabelBeforeInsn(const MachineInstr *MI) {

lib/CodeGen/CodeGenPrepare.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2297,7 +2297,7 @@ static bool IsOperandAMemoryOperand(CallInst *CI, InlineAsm *IA, Value *OpVal,
22972297
/// Add the ultimately found memory instructions to MemoryUses.
22982298
static bool FindAllMemoryUses(Instruction *I,
22992299
SmallVectorImpl<std::pair<Instruction*,unsigned> > &MemoryUses,
2300-
SmallPtrSet<Instruction*, 16> &ConsideredInsts,
2300+
SmallPtrSetImpl<Instruction*> &ConsideredInsts,
23012301
const TargetLowering &TLI) {
23022302
// If we already considered this instruction, we're done.
23032303
if (!ConsideredInsts.insert(I))

lib/CodeGen/LexicalScopes.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ void LexicalScopes::assignInstructionRanges(
285285
/// have machine instructions that belong to lexical scope identified by
286286
/// DebugLoc.
287287
void LexicalScopes::getMachineBasicBlocks(
288-
DebugLoc DL, SmallPtrSet<const MachineBasicBlock *, 4> &MBBs) {
288+
DebugLoc DL, SmallPtrSetImpl<const MachineBasicBlock *> &MBBs) {
289289
MBBs.clear();
290290
LexicalScope *Scope = getOrCreateLexicalScope(DL);
291291
if (!Scope)

lib/CodeGen/RegisterCoalescer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1439,7 +1439,7 @@ class JoinVals {
14391439
/// Add erased instructions to ErasedInstrs.
14401440
/// Add foreign virtual registers to ShrinkRegs if their live range ended at
14411441
/// the erased instrs.
1442-
void eraseInstrs(SmallPtrSet<MachineInstr*, 8> &ErasedInstrs,
1442+
void eraseInstrs(SmallPtrSetImpl<MachineInstr*> &ErasedInstrs,
14431443
SmallVectorImpl<unsigned> &ShrinkRegs);
14441444

14451445
/// Get the value assignments suitable for passing to LiveInterval::join.
@@ -1952,7 +1952,7 @@ void JoinVals::pruneValues(JoinVals &Other,
19521952
}
19531953
}
19541954

1955-
void JoinVals::eraseInstrs(SmallPtrSet<MachineInstr*, 8> &ErasedInstrs,
1955+
void JoinVals::eraseInstrs(SmallPtrSetImpl<MachineInstr*> &ErasedInstrs,
19561956
SmallVectorImpl<unsigned> &ShrinkRegs) {
19571957
for (unsigned i = 0, e = LI.getNumValNums(); i != e; ++i) {
19581958
// Get the def location before markUnused() below invalidates it.

lib/CodeGen/ScheduleDAGInstrs.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ static bool MIsNeedChainEdge(AliasAnalysis *AA, const MachineFrameInfo *MFI,
575575
static unsigned
576576
iterateChainSucc(AliasAnalysis *AA, const MachineFrameInfo *MFI,
577577
SUnit *SUa, SUnit *SUb, SUnit *ExitSU, unsigned *Depth,
578-
SmallPtrSet<const SUnit*, 16> &Visited) {
578+
SmallPtrSetImpl<const SUnit*> &Visited) {
579579
if (!SUa || !SUb || SUb == ExitSU)
580580
return *Depth;
581581

lib/CodeGen/SelectionDAG/SelectionDAG.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6398,7 +6398,7 @@ bool SDNode::hasPredecessor(const SDNode *N) const {
63986398

63996399
bool
64006400
SDNode::hasPredecessorHelper(const SDNode *N,
6401-
SmallPtrSet<const SDNode *, 32> &Visited,
6401+
SmallPtrSetImpl<const SDNode *> &Visited,
64026402
SmallVectorImpl<const SDNode *> &Worklist) const {
64036403
if (Visited.empty()) {
64046404
Worklist.push_back(this);
@@ -6776,8 +6776,8 @@ bool ShuffleVectorSDNode::isSplatMask(const int *Mask, EVT VT) {
67766776

67776777
#ifndef NDEBUG
67786778
static void checkForCyclesHelper(const SDNode *N,
6779-
SmallPtrSet<const SDNode*, 32> &Visited,
6780-
SmallPtrSet<const SDNode*, 32> &Checked,
6779+
SmallPtrSetImpl<const SDNode*> &Visited,
6780+
SmallPtrSetImpl<const SDNode*> &Checked,
67816781
const llvm::SelectionDAG *DAG) {
67826782
// If this node has already been checked, don't check it again.
67836783
if (Checked.count(N))

lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1731,7 +1731,7 @@ static SDNode *findGlueUse(SDNode *N) {
17311731
/// This function recursively traverses up the operand chain, ignoring
17321732
/// certain nodes.
17331733
static bool findNonImmUse(SDNode *Use, SDNode* Def, SDNode *ImmedUse,
1734-
SDNode *Root, SmallPtrSet<SDNode*, 16> &Visited,
1734+
SDNode *Root, SmallPtrSetImpl<SDNode*> &Visited,
17351735
bool IgnoreChains) {
17361736
// The NodeID's are given uniques ID's where a node ID is guaranteed to be
17371737
// greater than all of its (recursive) operands. If we scan to a point where

lib/CodeGen/SjLjEHPrepare.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ void SjLjEHPrepare::insertCallSiteStore(Instruction *I, int Number) {
139139
/// MarkBlocksLiveIn - Insert BB and all of its predescessors into LiveBBs until
140140
/// we reach blocks we've already seen.
141141
static void MarkBlocksLiveIn(BasicBlock *BB,
142-
SmallPtrSet<BasicBlock *, 64> &LiveBBs) {
142+
SmallPtrSetImpl<BasicBlock *> &LiveBBs) {
143143
if (!LiveBBs.insert(BB))
144144
return; // already been here.
145145

lib/IR/Constants.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ void Constant::destroyConstantImpl() {
283283
}
284284

285285
static bool canTrapImpl(const Constant *C,
286-
SmallPtrSet<const ConstantExpr *, 4> &NonTrappingOps) {
286+
SmallPtrSetImpl<const ConstantExpr *> &NonTrappingOps) {
287287
assert(C->getType()->isFirstClassType() && "Cannot evaluate aggregate vals!");
288288
// The only thing that could possibly trap are constant exprs.
289289
const ConstantExpr *CE = dyn_cast<ConstantExpr>(C);

lib/IR/Type.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ int Type::getFPMantissaWidth() const {
155155
/// isSizedDerivedType - Derived types like structures and arrays are sized
156156
/// iff all of the members of the type are sized as well. Since asking for
157157
/// their size is relatively uncommon, move this operation out of line.
158-
bool Type::isSizedDerivedType(SmallPtrSet<const Type*, 4> *Visited) const {
158+
bool Type::isSizedDerivedType(SmallPtrSetImpl<const Type*> *Visited) const {
159159
if (const ArrayType *ATy = dyn_cast<ArrayType>(this))
160160
return ATy->getElementType()->isSized(Visited);
161161

@@ -554,7 +554,7 @@ StructType *StructType::create(StringRef Name, Type *type, ...) {
554554
return Ret;
555555
}
556556

557-
bool StructType::isSized(SmallPtrSet<const Type*, 4> *Visited) const {
557+
bool StructType::isSized(SmallPtrSetImpl<const Type*> *Visited) const {
558558
if ((getSubclassData() & SCDB_IsSized) != 0)
559559
return true;
560560
if (isOpaque())

lib/IR/Value.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ void Value::takeName(Value *V) {
303303
}
304304

305305
#ifndef NDEBUG
306-
static bool contains(SmallPtrSet<ConstantExpr *, 4> &Cache, ConstantExpr *Expr,
306+
static bool contains(SmallPtrSetImpl<ConstantExpr *> &Cache, ConstantExpr *Expr,
307307
Constant *C) {
308308
if (!Cache.insert(Expr))
309309
return false;
@@ -476,7 +476,7 @@ Value *Value::stripInBoundsOffsets() {
476476
/// isDereferenceablePointer - Test if this value is always a pointer to
477477
/// allocated and suitably aligned memory for a simple load or store.
478478
static bool isDereferenceablePointer(const Value *V, const DataLayout *DL,
479-
SmallPtrSet<const Value *, 32> &Visited) {
479+
SmallPtrSetImpl<const Value *> &Visited) {
480480
// Note that it is not safe to speculate into a malloc'd region because
481481
// malloc may return null.
482482

lib/IR/Verifier.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ class Verifier : public InstVisitor<Verifier>, VerifierSupport {
257257
void visitGlobalVariable(const GlobalVariable &GV);
258258
void visitGlobalAlias(const GlobalAlias &GA);
259259
void visitAliaseeSubExpr(const GlobalAlias &A, const Constant &C);
260-
void visitAliaseeSubExpr(SmallPtrSet<const GlobalAlias *, 4> &Visited,
260+
void visitAliaseeSubExpr(SmallPtrSetImpl<const GlobalAlias *> &Visited,
261261
const GlobalAlias &A, const Constant &C);
262262
void visitNamedMDNode(const NamedMDNode &NMD);
263263
void visitMDNode(MDNode &MD, Function *F);
@@ -502,7 +502,7 @@ void Verifier::visitAliaseeSubExpr(const GlobalAlias &GA, const Constant &C) {
502502
visitAliaseeSubExpr(Visited, GA, C);
503503
}
504504

505-
void Verifier::visitAliaseeSubExpr(SmallPtrSet<const GlobalAlias *, 4> &Visited,
505+
void Verifier::visitAliaseeSubExpr(SmallPtrSetImpl<const GlobalAlias*> &Visited,
506506
const GlobalAlias &GA, const Constant &C) {
507507
if (const auto *GV = dyn_cast<GlobalValue>(&C)) {
508508
Assert1(!GV->isDeclaration(), "Alias must point to a definition", &GA);

lib/LTO/LTOCodeGenerator.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ void LTOCodeGenerator::
314314
applyRestriction(GlobalValue &GV,
315315
const ArrayRef<StringRef> &Libcalls,
316316
std::vector<const char*> &MustPreserveList,
317-
SmallPtrSet<GlobalValue*, 8> &AsmUsed,
317+
SmallPtrSetImpl<GlobalValue*> &AsmUsed,
318318
Mangler &Mangler) {
319319
// There are no restrictions to apply to declarations.
320320
if (GV.isDeclaration())
@@ -343,7 +343,7 @@ applyRestriction(GlobalValue &GV,
343343
}
344344

345345
static void findUsedValues(GlobalVariable *LLVMUsed,
346-
SmallPtrSet<GlobalValue*, 8> &UsedValues) {
346+
SmallPtrSetImpl<GlobalValue*> &UsedValues) {
347347
if (!LLVMUsed) return;
348348

349349
ConstantArray *Inits = cast<ConstantArray>(LLVMUsed->getInitializer());

lib/Target/ARM/ARMLoadStoreOptimizer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1714,7 +1714,7 @@ bool ARMPreAllocLoadStoreOpt::runOnMachineFunction(MachineFunction &Fn) {
17141714
static bool IsSafeAndProfitableToMove(bool isLd, unsigned Base,
17151715
MachineBasicBlock::iterator I,
17161716
MachineBasicBlock::iterator E,
1717-
SmallPtrSet<MachineInstr*, 4> &MemOps,
1717+
SmallPtrSetImpl<MachineInstr*> &MemOps,
17181718
SmallSet<unsigned, 4> &MemRegs,
17191719
const TargetRegisterInfo *TRI) {
17201720
// Are there stores / loads / calls between them?

lib/Transforms/IPO/ArgumentPromotion.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ namespace {
8181
CallGraphNode *PromoteArguments(CallGraphNode *CGN);
8282
bool isSafeToPromoteArgument(Argument *Arg, bool isByVal) const;
8383
CallGraphNode *DoPromotion(Function *F,
84-
SmallPtrSet<Argument*, 8> &ArgsToPromote,
85-
SmallPtrSet<Argument*, 8> &ByValArgsToTransform);
84+
SmallPtrSetImpl<Argument*> &ArgsToPromote,
85+
SmallPtrSetImpl<Argument*> &ByValArgsToTransform);
8686

8787
using llvm::Pass::doInitialization;
8888
bool doInitialization(CallGraph &CG) override;
@@ -495,8 +495,8 @@ bool ArgPromotion::isSafeToPromoteArgument(Argument *Arg,
495495
/// arguments, and returns the new function. At this point, we know that it's
496496
/// safe to do so.
497497
CallGraphNode *ArgPromotion::DoPromotion(Function *F,
498-
SmallPtrSet<Argument*, 8> &ArgsToPromote,
499-
SmallPtrSet<Argument*, 8> &ByValArgsToTransform) {
498+
SmallPtrSetImpl<Argument*> &ArgsToPromote,
499+
SmallPtrSetImpl<Argument*> &ByValArgsToTransform) {
500500

501501
// Start by computing a new prototype for the function, which is the same as
502502
// the old function, but has modified arguments.

lib/Transforms/IPO/ConstantMerge.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ ModulePass *llvm::createConstantMergePass() { return new ConstantMerge(); }
6666

6767
/// Find values that are marked as llvm.used.
6868
static void FindUsedValues(GlobalVariable *LLVMUsed,
69-
SmallPtrSet<const GlobalValue*, 8> &UsedValues) {
69+
SmallPtrSetImpl<const GlobalValue*> &UsedValues) {
7070
if (!LLVMUsed) return;
7171
ConstantArray *Inits = cast<ConstantArray>(LLVMUsed->getInitializer());
7272

0 commit comments

Comments
 (0)