Skip to content

Commit

Permalink
Repace SmallPtrSet with SmallPtrSetImpl in function arguments to avoi…
Browse files Browse the repository at this point in the history
…d needing to mention the size.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215868 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
topperc committed Aug 17, 2014
1 parent 6de46b5 commit f06c707
Show file tree
Hide file tree
Showing 49 changed files with 114 additions and 114 deletions.
2 changes: 1 addition & 1 deletion include/llvm/Analysis/IVUsers.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ class IVUsers : public LoopPass {
/// dump - This method is used for debugging.
void dump() const;
protected:
bool AddUsersImpl(Instruction *I, SmallPtrSet<Loop*,16> &SimpleLoopNests);
bool AddUsersImpl(Instruction *I, SmallPtrSetImpl<Loop*> &SimpleLoopNests);
};

Pass *createIVUsersPass();
Expand Down
2 changes: 1 addition & 1 deletion include/llvm/CodeGen/LexicalScopes.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ class LexicalScopes {
/// which have machine instructions that belong to lexical scope identified by
/// DebugLoc.
void getMachineBasicBlocks(DebugLoc DL,
SmallPtrSet<const MachineBasicBlock *, 4> &MBBs);
SmallPtrSetImpl<const MachineBasicBlock *> &MBBs);

/// dominates - Return true if DebugLoc's lexical scope dominates at least one
/// machine instruction's lexical scope in a given machine basic block.
Expand Down
2 changes: 1 addition & 1 deletion include/llvm/CodeGen/SelectionDAGNodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ class SDNode : public FoldingSetNode, public ilist_node<SDNode> {
/// changes.
/// NOTE: This is still very expensive. Use carefully.
bool hasPredecessorHelper(const SDNode *N,
SmallPtrSet<const SDNode *, 32> &Visited,
SmallPtrSetImpl<const SDNode *> &Visited,
SmallVectorImpl<const SDNode *> &Worklist) const;

/// getNumOperands - Return the number of values used by this operation.
Expand Down
2 changes: 1 addition & 1 deletion include/llvm/IR/DerivedTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ class StructType : public CompositeType {
bool isOpaque() const { return (getSubclassData() & SCDB_HasBody) == 0; }

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

/// hasName - Return true if this is a named struct that has a non-empty name.
bool hasName() const { return SymbolTableEntry != nullptr; }
Expand Down
4 changes: 2 additions & 2 deletions include/llvm/IR/Type.h
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ class Type {
/// get the actual size for a particular target, it is reasonable to use the
/// DataLayout subsystem to do this.
///
bool isSized(SmallPtrSet<const Type*, 4> *Visited = nullptr) const {
bool isSized(SmallPtrSetImpl<const Type*> *Visited = nullptr) const {
// If it's a primitive, it is always sized.
if (getTypeID() == IntegerTyID || isFloatingPointTy() ||
getTypeID() == PointerTyID ||
Expand Down Expand Up @@ -419,7 +419,7 @@ class Type {
/// isSizedDerivedType - Derived types like structures and arrays are sized
/// iff all of the members of the type are sized as well. Since asking for
/// their size is relatively uncommon, move this operation out of line.
bool isSizedDerivedType(SmallPtrSet<const Type*, 4> *Visited = nullptr) const;
bool isSizedDerivedType(SmallPtrSetImpl<const Type*> *Visited = nullptr) const;
};

// Printing of types.
Expand Down
2 changes: 1 addition & 1 deletion include/llvm/LTO/LTOCodeGenerator.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ struct LTOCodeGenerator {
void applyScopeRestrictions();
void applyRestriction(GlobalValue &GV, const ArrayRef<StringRef> &Libcalls,
std::vector<const char *> &MustPreserveList,
SmallPtrSet<GlobalValue *, 8> &AsmUsed,
SmallPtrSetImpl<GlobalValue *> &AsmUsed,
Mangler &Mangler);
bool determineTarget(std::string &errMsg);

Expand Down
4 changes: 2 additions & 2 deletions include/llvm/Transforms/Utils/ModuleUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Module;
class Function;
class GlobalValue;
class GlobalVariable;
template <class PtrType, unsigned SmallSize> class SmallPtrSet;
template <class PtrType> class SmallPtrSetImpl;

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

Expand Down
2 changes: 1 addition & 1 deletion lib/Analysis/ConstantFolding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -967,7 +967,7 @@ Constant *llvm::ConstantFoldInstruction(Instruction *I,
static Constant *
ConstantFoldConstantExpressionImpl(const ConstantExpr *CE, const DataLayout *TD,
const TargetLibraryInfo *TLI,
SmallPtrSet<ConstantExpr *, 4> &FoldedOps) {
SmallPtrSetImpl<ConstantExpr *> &FoldedOps) {
SmallVector<Constant *, 8> Ops;
for (User::const_op_iterator i = CE->op_begin(), e = CE->op_end(); i != e;
++i) {
Expand Down
4 changes: 2 additions & 2 deletions lib/Analysis/IVUsers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ static bool isInteresting(const SCEV *S, const Instruction *I, const Loop *L,
/// form.
static bool isSimplifiedLoopNest(BasicBlock *BB, const DominatorTree *DT,
const LoopInfo *LI,
SmallPtrSet<Loop*,16> &SimpleLoopNests) {
SmallPtrSetImpl<Loop*> &SimpleLoopNests) {
Loop *NearestLoop = nullptr;
for (DomTreeNode *Rung = DT->getNode(BB);
Rung; Rung = Rung->getIDom()) {
Expand Down Expand Up @@ -112,7 +112,7 @@ static bool isSimplifiedLoopNest(BasicBlock *BB, const DominatorTree *DT,
/// reducible SCEV, recursively add its users to the IVUsesByStride set and
/// return true. Otherwise, return false.
bool IVUsers::AddUsersImpl(Instruction *I,
SmallPtrSet<Loop*,16> &SimpleLoopNests) {
SmallPtrSetImpl<Loop*> &SimpleLoopNests) {
// Add this IV user to the Processed set before returning false to ensure that
// all IV users are members of the set. See IVUsers::isIVUserOrOperand.
if (!Processed.insert(I))
Expand Down
4 changes: 2 additions & 2 deletions lib/Analysis/Lint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ namespace {

Value *findValue(Value *V, bool OffsetOk) const;
Value *findValueImpl(Value *V, bool OffsetOk,
SmallPtrSet<Value *, 4> &Visited) const;
SmallPtrSetImpl<Value *> &Visited) const;

public:
Module *Mod;
Expand Down Expand Up @@ -622,7 +622,7 @@ Value *Lint::findValue(Value *V, bool OffsetOk) const {

/// findValueImpl - Implementation helper for findValue.
Value *Lint::findValueImpl(Value *V, bool OffsetOk,
SmallPtrSet<Value *, 4> &Visited) const {
SmallPtrSetImpl<Value *> &Visited) const {
// Detect self-referential values.
if (!Visited.insert(V))
return UndefValue::get(V->getType());
Expand Down
2 changes: 1 addition & 1 deletion lib/Analysis/ValueTracking.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1833,7 +1833,7 @@ bool llvm::getConstantStringInfo(const Value *V, StringRef &Str,

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

Expand Down
4 changes: 2 additions & 2 deletions lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1149,7 +1149,7 @@ bool DwarfDebug::addCurrentFnArgument(DbgVariable *Var, LexicalScope *Scope) {

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

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

Expand Down
4 changes: 2 additions & 2 deletions lib/CodeGen/AsmPrinter/DwarfDebug.h
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ class DwarfDebug : public AsmPrinterHandler {
bool addCurrentFnArgument(DbgVariable *Var, LexicalScope *Scope);

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

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

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

/// \brief Ensure that a label will be emitted before MI.
void requestLabelBeforeInsn(const MachineInstr *MI) {
Expand Down
2 changes: 1 addition & 1 deletion lib/CodeGen/CodeGenPrepare.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2297,7 +2297,7 @@ static bool IsOperandAMemoryOperand(CallInst *CI, InlineAsm *IA, Value *OpVal,
/// Add the ultimately found memory instructions to MemoryUses.
static bool FindAllMemoryUses(Instruction *I,
SmallVectorImpl<std::pair<Instruction*,unsigned> > &MemoryUses,
SmallPtrSet<Instruction*, 16> &ConsideredInsts,
SmallPtrSetImpl<Instruction*> &ConsideredInsts,
const TargetLowering &TLI) {
// If we already considered this instruction, we're done.
if (!ConsideredInsts.insert(I))
Expand Down
2 changes: 1 addition & 1 deletion lib/CodeGen/LexicalScopes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ void LexicalScopes::assignInstructionRanges(
/// have machine instructions that belong to lexical scope identified by
/// DebugLoc.
void LexicalScopes::getMachineBasicBlocks(
DebugLoc DL, SmallPtrSet<const MachineBasicBlock *, 4> &MBBs) {
DebugLoc DL, SmallPtrSetImpl<const MachineBasicBlock *> &MBBs) {
MBBs.clear();
LexicalScope *Scope = getOrCreateLexicalScope(DL);
if (!Scope)
Expand Down
4 changes: 2 additions & 2 deletions lib/CodeGen/RegisterCoalescer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1439,7 +1439,7 @@ class JoinVals {
/// Add erased instructions to ErasedInstrs.
/// Add foreign virtual registers to ShrinkRegs if their live range ended at
/// the erased instrs.
void eraseInstrs(SmallPtrSet<MachineInstr*, 8> &ErasedInstrs,
void eraseInstrs(SmallPtrSetImpl<MachineInstr*> &ErasedInstrs,
SmallVectorImpl<unsigned> &ShrinkRegs);

/// Get the value assignments suitable for passing to LiveInterval::join.
Expand Down Expand Up @@ -1952,7 +1952,7 @@ void JoinVals::pruneValues(JoinVals &Other,
}
}

void JoinVals::eraseInstrs(SmallPtrSet<MachineInstr*, 8> &ErasedInstrs,
void JoinVals::eraseInstrs(SmallPtrSetImpl<MachineInstr*> &ErasedInstrs,
SmallVectorImpl<unsigned> &ShrinkRegs) {
for (unsigned i = 0, e = LI.getNumValNums(); i != e; ++i) {
// Get the def location before markUnused() below invalidates it.
Expand Down
2 changes: 1 addition & 1 deletion lib/CodeGen/ScheduleDAGInstrs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ static bool MIsNeedChainEdge(AliasAnalysis *AA, const MachineFrameInfo *MFI,
static unsigned
iterateChainSucc(AliasAnalysis *AA, const MachineFrameInfo *MFI,
SUnit *SUa, SUnit *SUb, SUnit *ExitSU, unsigned *Depth,
SmallPtrSet<const SUnit*, 16> &Visited) {
SmallPtrSetImpl<const SUnit*> &Visited) {
if (!SUa || !SUb || SUb == ExitSU)
return *Depth;

Expand Down
6 changes: 3 additions & 3 deletions lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6398,7 +6398,7 @@ bool SDNode::hasPredecessor(const SDNode *N) const {

bool
SDNode::hasPredecessorHelper(const SDNode *N,
SmallPtrSet<const SDNode *, 32> &Visited,
SmallPtrSetImpl<const SDNode *> &Visited,
SmallVectorImpl<const SDNode *> &Worklist) const {
if (Visited.empty()) {
Worklist.push_back(this);
Expand Down Expand Up @@ -6776,8 +6776,8 @@ bool ShuffleVectorSDNode::isSplatMask(const int *Mask, EVT VT) {

#ifndef NDEBUG
static void checkForCyclesHelper(const SDNode *N,
SmallPtrSet<const SDNode*, 32> &Visited,
SmallPtrSet<const SDNode*, 32> &Checked,
SmallPtrSetImpl<const SDNode*> &Visited,
SmallPtrSetImpl<const SDNode*> &Checked,
const llvm::SelectionDAG *DAG) {
// If this node has already been checked, don't check it again.
if (Checked.count(N))
Expand Down
2 changes: 1 addition & 1 deletion lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1731,7 +1731,7 @@ static SDNode *findGlueUse(SDNode *N) {
/// This function recursively traverses up the operand chain, ignoring
/// certain nodes.
static bool findNonImmUse(SDNode *Use, SDNode* Def, SDNode *ImmedUse,
SDNode *Root, SmallPtrSet<SDNode*, 16> &Visited,
SDNode *Root, SmallPtrSetImpl<SDNode*> &Visited,
bool IgnoreChains) {
// The NodeID's are given uniques ID's where a node ID is guaranteed to be
// greater than all of its (recursive) operands. If we scan to a point where
Expand Down
2 changes: 1 addition & 1 deletion lib/CodeGen/SjLjEHPrepare.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ void SjLjEHPrepare::insertCallSiteStore(Instruction *I, int Number) {
/// MarkBlocksLiveIn - Insert BB and all of its predescessors into LiveBBs until
/// we reach blocks we've already seen.
static void MarkBlocksLiveIn(BasicBlock *BB,
SmallPtrSet<BasicBlock *, 64> &LiveBBs) {
SmallPtrSetImpl<BasicBlock *> &LiveBBs) {
if (!LiveBBs.insert(BB))
return; // already been here.

Expand Down
2 changes: 1 addition & 1 deletion lib/IR/Constants.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ void Constant::destroyConstantImpl() {
}

static bool canTrapImpl(const Constant *C,
SmallPtrSet<const ConstantExpr *, 4> &NonTrappingOps) {
SmallPtrSetImpl<const ConstantExpr *> &NonTrappingOps) {
assert(C->getType()->isFirstClassType() && "Cannot evaluate aggregate vals!");
// The only thing that could possibly trap are constant exprs.
const ConstantExpr *CE = dyn_cast<ConstantExpr>(C);
Expand Down
4 changes: 2 additions & 2 deletions lib/IR/Type.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ int Type::getFPMantissaWidth() const {
/// isSizedDerivedType - Derived types like structures and arrays are sized
/// iff all of the members of the type are sized as well. Since asking for
/// their size is relatively uncommon, move this operation out of line.
bool Type::isSizedDerivedType(SmallPtrSet<const Type*, 4> *Visited) const {
bool Type::isSizedDerivedType(SmallPtrSetImpl<const Type*> *Visited) const {
if (const ArrayType *ATy = dyn_cast<ArrayType>(this))
return ATy->getElementType()->isSized(Visited);

Expand Down Expand Up @@ -554,7 +554,7 @@ StructType *StructType::create(StringRef Name, Type *type, ...) {
return Ret;
}

bool StructType::isSized(SmallPtrSet<const Type*, 4> *Visited) const {
bool StructType::isSized(SmallPtrSetImpl<const Type*> *Visited) const {
if ((getSubclassData() & SCDB_IsSized) != 0)
return true;
if (isOpaque())
Expand Down
4 changes: 2 additions & 2 deletions lib/IR/Value.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ void Value::takeName(Value *V) {
}

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

Expand Down
4 changes: 2 additions & 2 deletions lib/IR/Verifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ class Verifier : public InstVisitor<Verifier>, VerifierSupport {
void visitGlobalVariable(const GlobalVariable &GV);
void visitGlobalAlias(const GlobalAlias &GA);
void visitAliaseeSubExpr(const GlobalAlias &A, const Constant &C);
void visitAliaseeSubExpr(SmallPtrSet<const GlobalAlias *, 4> &Visited,
void visitAliaseeSubExpr(SmallPtrSetImpl<const GlobalAlias *> &Visited,
const GlobalAlias &A, const Constant &C);
void visitNamedMDNode(const NamedMDNode &NMD);
void visitMDNode(MDNode &MD, Function *F);
Expand Down Expand Up @@ -502,7 +502,7 @@ void Verifier::visitAliaseeSubExpr(const GlobalAlias &GA, const Constant &C) {
visitAliaseeSubExpr(Visited, GA, C);
}

void Verifier::visitAliaseeSubExpr(SmallPtrSet<const GlobalAlias *, 4> &Visited,
void Verifier::visitAliaseeSubExpr(SmallPtrSetImpl<const GlobalAlias*> &Visited,
const GlobalAlias &GA, const Constant &C) {
if (const auto *GV = dyn_cast<GlobalValue>(&C)) {
Assert1(!GV->isDeclaration(), "Alias must point to a definition", &GA);
Expand Down
4 changes: 2 additions & 2 deletions lib/LTO/LTOCodeGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ void LTOCodeGenerator::
applyRestriction(GlobalValue &GV,
const ArrayRef<StringRef> &Libcalls,
std::vector<const char*> &MustPreserveList,
SmallPtrSet<GlobalValue*, 8> &AsmUsed,
SmallPtrSetImpl<GlobalValue*> &AsmUsed,
Mangler &Mangler) {
// There are no restrictions to apply to declarations.
if (GV.isDeclaration())
Expand Down Expand Up @@ -343,7 +343,7 @@ applyRestriction(GlobalValue &GV,
}

static void findUsedValues(GlobalVariable *LLVMUsed,
SmallPtrSet<GlobalValue*, 8> &UsedValues) {
SmallPtrSetImpl<GlobalValue*> &UsedValues) {
if (!LLVMUsed) return;

ConstantArray *Inits = cast<ConstantArray>(LLVMUsed->getInitializer());
Expand Down
2 changes: 1 addition & 1 deletion lib/Target/ARM/ARMLoadStoreOptimizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1714,7 +1714,7 @@ bool ARMPreAllocLoadStoreOpt::runOnMachineFunction(MachineFunction &Fn) {
static bool IsSafeAndProfitableToMove(bool isLd, unsigned Base,
MachineBasicBlock::iterator I,
MachineBasicBlock::iterator E,
SmallPtrSet<MachineInstr*, 4> &MemOps,
SmallPtrSetImpl<MachineInstr*> &MemOps,
SmallSet<unsigned, 4> &MemRegs,
const TargetRegisterInfo *TRI) {
// Are there stores / loads / calls between them?
Expand Down
8 changes: 4 additions & 4 deletions lib/Transforms/IPO/ArgumentPromotion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ namespace {
CallGraphNode *PromoteArguments(CallGraphNode *CGN);
bool isSafeToPromoteArgument(Argument *Arg, bool isByVal) const;
CallGraphNode *DoPromotion(Function *F,
SmallPtrSet<Argument*, 8> &ArgsToPromote,
SmallPtrSet<Argument*, 8> &ByValArgsToTransform);
SmallPtrSetImpl<Argument*> &ArgsToPromote,
SmallPtrSetImpl<Argument*> &ByValArgsToTransform);

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

// Start by computing a new prototype for the function, which is the same as
// the old function, but has modified arguments.
Expand Down
2 changes: 1 addition & 1 deletion lib/Transforms/IPO/ConstantMerge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ ModulePass *llvm::createConstantMergePass() { return new ConstantMerge(); }

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

Expand Down
Loading

0 comments on commit f06c707

Please sign in to comment.