diff options
-rw-r--r-- | llvm/lib/CodeGen/CodeGenPrepare.cpp | 3 | ||||
-rw-r--r-- | llvm/lib/IR/Metadata.cpp | 3 | ||||
-rw-r--r-- | llvm/lib/Target/AArch64/AArch64Subtarget.cpp | 3 | ||||
-rw-r--r-- | llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp | 3 | ||||
-rw-r--r-- | llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp | 3 | ||||
-rw-r--r-- | llvm/lib/Target/X86/X86RegisterInfo.cpp | 3 | ||||
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/Transforms/Scalar/LICM.cpp | 7 | ||||
-rw-r--r-- | llvm/lib/Transforms/Utils/LoopUtils.cpp | 3 | ||||
-rw-r--r-- | llvm/tools/llvm-exegesis/lib/Clustering.cpp | 4 | ||||
-rw-r--r-- | llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp | 3 |
11 files changed, 15 insertions, 24 deletions
diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp index 2d34c8e..e3d6a5e 100644 --- a/llvm/lib/CodeGen/CodeGenPrepare.cpp +++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp @@ -7576,8 +7576,7 @@ bool CodeGenPrepare::optimizeSelectInst(SelectInst *SI) { else if (FalseBlock == nullptr) FalseBlock = StartBlock; - SmallPtrSet<const Instruction *, 2> INS; - INS.insert_range(ASI); + SmallPtrSet<const Instruction *, 2> INS(llvm::from_range, ASI); // Use reverse iterator because later select may use the value of the // earlier select, and we need to propagate value through earlier select // to get the PHI operand. diff --git a/llvm/lib/IR/Metadata.cpp b/llvm/lib/IR/Metadata.cpp index f3b0b86..bc722c7 100644 --- a/llvm/lib/IR/Metadata.cpp +++ b/llvm/lib/IR/Metadata.cpp @@ -1635,8 +1635,7 @@ void Instruction::dropUnknownNonDebugMetadata(ArrayRef<unsigned> KnownIDs) { if (!Value::hasMetadata()) return; // Nothing to remove! - SmallSet<unsigned, 32> KnownSet; - KnownSet.insert_range(KnownIDs); + SmallSet<unsigned, 32> KnownSet(llvm::from_range, KnownIDs); // A DIAssignID attachment is debug metadata, don't drop it. KnownSet.insert(LLVMContext::MD_DIAssignID); diff --git a/llvm/lib/Target/AArch64/AArch64Subtarget.cpp b/llvm/lib/Target/AArch64/AArch64Subtarget.cpp index f7defe7..0c2a4eb 100644 --- a/llvm/lib/Target/AArch64/AArch64Subtarget.cpp +++ b/llvm/lib/Target/AArch64/AArch64Subtarget.cpp @@ -394,8 +394,7 @@ AArch64Subtarget::AArch64Subtarget(const Triple &TT, StringRef CPU, RegBankInfo.reset(RBI); auto TRI = getRegisterInfo(); - StringSet<> ReservedRegNames; - ReservedRegNames.insert_range(ReservedRegsForRA); + StringSet<> ReservedRegNames(llvm::from_range, ReservedRegsForRA); for (unsigned i = 0; i < 29; ++i) { if (ReservedRegNames.count(TRI->getName(AArch64::X0 + i))) ReserveXRegisterForRA.set(i); diff --git a/llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp b/llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp index d4de436..e7c53b7 100644 --- a/llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp +++ b/llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp @@ -794,8 +794,7 @@ bool LowOverheadLoop::ValidateTailPredicate() { !RDA.hasLocalDefBefore(VCTP, VCTP->getOperand(1).getReg())) { if (auto *Def = RDA.getUniqueReachingMIDef( &Preheader->back(), VCTP->getOperand(1).getReg().asMCReg())) { - SmallPtrSet<MachineInstr*, 2> Ignore; - Ignore.insert_range(VCTPs); + SmallPtrSet<MachineInstr *, 2> Ignore(llvm::from_range, VCTPs); TryRemove(Def, RDA, ToRemove, Ignore); } } diff --git a/llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp b/llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp index 2939f19..1e0c043 100644 --- a/llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp +++ b/llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp @@ -58,8 +58,7 @@ static void addHints(ArrayRef<MCPhysReg> Order, SmallVectorImpl<MCPhysReg> &Hints, const TargetRegisterClass *RC, const MachineRegisterInfo *MRI) { - SmallSet<unsigned, 4> CopyHints; - CopyHints.insert_range(Hints); + SmallSet<unsigned, 4> CopyHints(llvm::from_range, Hints); Hints.clear(); for (MCPhysReg Reg : Order) if (CopyHints.count(Reg) && diff --git a/llvm/lib/Target/X86/X86RegisterInfo.cpp b/llvm/lib/Target/X86/X86RegisterInfo.cpp index 4f8daf8..1c4114f 100644 --- a/llvm/lib/Target/X86/X86RegisterInfo.cpp +++ b/llvm/lib/Target/X86/X86RegisterInfo.cpp @@ -1213,8 +1213,7 @@ bool X86RegisterInfo::getRegAllocationHints(Register VirtReg, Hints.push_back(PhysReg); }; - SmallSet<MCPhysReg, 4> CopyHints; - CopyHints.insert_range(Hints); + SmallSet<MCPhysReg, 4> CopyHints(llvm::from_range, Hints); Hints.clear(); for (auto Hint : CopyHints) { if (RC.contains(Hint) && !MRI->isReserved(Hint)) diff --git a/llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp b/llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp index 2960fcf..1fca354 100644 --- a/llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp +++ b/llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp @@ -967,9 +967,7 @@ void FunctionInstrumenter::instrument() { InstrumentBBs.size() + FuncInfo.SIVisitor.getNumOfSelectInsts(); if (IsCtxProf) { - StringSet<> SkipCSInstr; - SkipCSInstr.insert(CtxPGOSkipCallsiteInstrument.begin(), - CtxPGOSkipCallsiteInstrument.end()); + StringSet<> SkipCSInstr(llvm::from_range, CtxPGOSkipCallsiteInstrument); auto *CSIntrinsic = Intrinsic::getOrInsertDeclaration(&M, Intrinsic::instrprof_callsite); diff --git a/llvm/lib/Transforms/Scalar/LICM.cpp b/llvm/lib/Transforms/Scalar/LICM.cpp index f42bc2c..119696c 100644 --- a/llvm/lib/Transforms/Scalar/LICM.cpp +++ b/llvm/lib/Transforms/Scalar/LICM.cpp @@ -688,9 +688,10 @@ public: // intersection of their successors is non-empty. // TODO: This could be expanded to allowing branches where both ends // eventually converge to a single block. - SmallPtrSet<BasicBlock *, 4> TrueDestSucc, FalseDestSucc; - TrueDestSucc.insert_range(successors(TrueDest)); - FalseDestSucc.insert_range(successors(FalseDest)); + SmallPtrSet<BasicBlock *, 4> TrueDestSucc(llvm::from_range, + successors(TrueDest)); + SmallPtrSet<BasicBlock *, 4> FalseDestSucc(llvm::from_range, + successors(FalseDest)); BasicBlock *CommonSucc = nullptr; if (TrueDestSucc.count(FalseDest)) { CommonSucc = FalseDest; diff --git a/llvm/lib/Transforms/Utils/LoopUtils.cpp b/llvm/lib/Transforms/Utils/LoopUtils.cpp index dd9f1d8..2e76852 100644 --- a/llvm/lib/Transforms/Utils/LoopUtils.cpp +++ b/llvm/lib/Transforms/Utils/LoopUtils.cpp @@ -700,8 +700,7 @@ void llvm::deleteDeadLoop(Loop *L, DominatorTree *DT, ScalarEvolution *SE, // Finally, the blocks from loopinfo. This has to happen late because // otherwise our loop iterators won't work. - SmallPtrSet<BasicBlock *, 8> blocks; - blocks.insert_range(L->blocks()); + SmallPtrSet<BasicBlock *, 8> blocks(llvm::from_range, L->blocks()); for (BasicBlock *BB : blocks) LI->removeBlock(BB); diff --git a/llvm/tools/llvm-exegesis/lib/Clustering.cpp b/llvm/tools/llvm-exegesis/lib/Clustering.cpp index 8f74dbf..81bc349 100644 --- a/llvm/tools/llvm-exegesis/lib/Clustering.cpp +++ b/llvm/tools/llvm-exegesis/lib/Clustering.cpp @@ -148,8 +148,8 @@ void BenchmarkClustering::clusterizeDbScan(const size_t MinPts) { CurrentCluster.PointIndices.push_back(P); // Process P's neighbors. - SetVector<size_t, std::deque<size_t>> ToProcess; - ToProcess.insert_range(Neighbors); + SetVector<size_t, std::deque<size_t>> ToProcess(llvm::from_range, + Neighbors); while (!ToProcess.empty()) { // Retrieve a point from the set. const size_t Q = *ToProcess.begin(); diff --git a/llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp b/llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp index 7fc3797..e9a7153 100644 --- a/llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp +++ b/llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp @@ -3321,8 +3321,7 @@ void CodeGenDAGPatterns::ParsePatternFragments(bool OutFrags) { std::vector<std::string> &Args = P->getArgList(); // Copy the args so we can take StringRefs to them. auto ArgsCopy = Args; - SmallDenseSet<StringRef, 4> OperandsSet; - OperandsSet.insert_range(ArgsCopy); + SmallDenseSet<StringRef, 4> OperandsSet(llvm::from_range, ArgsCopy); if (OperandsSet.count("")) P->error("Cannot have unnamed 'node' values in pattern fragment!"); |