diff options
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/CodeGen/Analysis.cpp | 9 | ||||
| -rw-r--r-- | llvm/lib/CodeGen/IfConversion.cpp | 10 | ||||
| -rw-r--r-- | llvm/lib/CodeGen/PeepholeOptimizer.cpp | 3 | ||||
| -rw-r--r-- | llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp | 3 | ||||
| -rw-r--r-- | llvm/lib/Target/X86/X86InstrInfo.cpp | 2 | ||||
| -rw-r--r-- | llvm/lib/Transforms/Scalar/SROA.cpp | 2 | 
6 files changed, 11 insertions, 18 deletions
diff --git a/llvm/lib/CodeGen/Analysis.cpp b/llvm/lib/CodeGen/Analysis.cpp index e50b846ddd8..8e11fe1c9cf 100644 --- a/llvm/lib/CodeGen/Analysis.cpp +++ b/llvm/lib/CodeGen/Analysis.cpp @@ -312,8 +312,7 @@ static const Value *getNoopInput(const Value *V,        // previous aggregate. Combine the two paths to obtain the true address of        // our element.        ArrayRef<unsigned> ExtractLoc = EVI->getIndices(); -      std::copy(ExtractLoc.rbegin(), ExtractLoc.rend(), -                std::back_inserter(ValLoc)); +      ValLoc.append(ExtractLoc.rbegin(), ExtractLoc.rend());        NoopInput = Op;      }      // Terminate if we couldn't find anything to look through. @@ -601,10 +600,8 @@ bool llvm::returnTypeIsEligibleForTailCall(const Function *F,      // The manipulations performed when we're looking through an insertvalue or      // an extractvalue would happen at the front of the RetPath list, so since      // we have to copy it anyway it's more efficient to create a reversed copy. -    using std::copy; -    SmallVector<unsigned, 4> TmpRetPath, TmpCallPath; -    copy(RetPath.rbegin(), RetPath.rend(), std::back_inserter(TmpRetPath)); -    copy(CallPath.rbegin(), CallPath.rend(), std::back_inserter(TmpCallPath)); +    SmallVector<unsigned, 4> TmpRetPath(RetPath.rbegin(), RetPath.rend()); +    SmallVector<unsigned, 4> TmpCallPath(CallPath.rbegin(), CallPath.rend());      // Finally, we can check whether the value produced by the tail call at this      // index is compatible with the value we return. diff --git a/llvm/lib/CodeGen/IfConversion.cpp b/llvm/lib/CodeGen/IfConversion.cpp index 7a295699cae..1a1f2a9d03c 100644 --- a/llvm/lib/CodeGen/IfConversion.cpp +++ b/llvm/lib/CodeGen/IfConversion.cpp @@ -1555,7 +1555,7 @@ void IfConverter::PredicateBlock(BBInfo &BBI,      UpdatePredRedefs(I, Redefs);    } -  std::copy(Cond.begin(), Cond.end(), std::back_inserter(BBI.Predicate)); +  BBI.Predicate.append(Cond.begin(), Cond.end());    BBI.IsAnalyzed = false;    BBI.NonPredSize = 0; @@ -1620,9 +1620,8 @@ void IfConverter::CopyAndPredicateBlock(BBInfo &ToBBI, BBInfo &FromBBI,      }    } -  std::copy(FromBBI.Predicate.begin(), FromBBI.Predicate.end(), -            std::back_inserter(ToBBI.Predicate)); -  std::copy(Cond.begin(), Cond.end(), std::back_inserter(ToBBI.Predicate)); +  ToBBI.Predicate.append(FromBBI.Predicate.begin(), FromBBI.Predicate.end()); +  ToBBI.Predicate.append(Cond.begin(), Cond.end());    ToBBI.ClobbersPred |= FromBBI.ClobbersPred;    ToBBI.IsAnalyzed = false; @@ -1661,8 +1660,7 @@ void IfConverter::MergeBlocks(BBInfo &ToBBI, BBInfo &FromBBI, bool AddEdges) {    if (NBB && !FromBBI.BB->isSuccessor(NBB))      FromBBI.BB->addSuccessor(NBB); -  std::copy(FromBBI.Predicate.begin(), FromBBI.Predicate.end(), -            std::back_inserter(ToBBI.Predicate)); +  ToBBI.Predicate.append(FromBBI.Predicate.begin(), FromBBI.Predicate.end());    FromBBI.Predicate.clear();    ToBBI.NonPredSize += FromBBI.NonPredSize; diff --git a/llvm/lib/CodeGen/PeepholeOptimizer.cpp b/llvm/lib/CodeGen/PeepholeOptimizer.cpp index 283d1f26198..2800d846ff3 100644 --- a/llvm/lib/CodeGen/PeepholeOptimizer.cpp +++ b/llvm/lib/CodeGen/PeepholeOptimizer.cpp @@ -411,8 +411,7 @@ optimizeExtInstr(MachineInstr *MI, MachineBasicBlock *MBB,    if (ExtendLife && !ExtendedUses.empty())      // Extend the liveness of the extension result. -    std::copy(ExtendedUses.begin(), ExtendedUses.end(), -              std::back_inserter(Uses)); +    Uses.append(ExtendedUses.begin(), ExtendedUses.end());    // Now replace all uses.    bool Changed = false; diff --git a/llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp b/llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp index fdb6dd26b11..cd6fbefd05d 100644 --- a/llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp +++ b/llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp @@ -67,8 +67,7 @@ void DWARFDebugLoc::parse(DataExtractor data, unsigned AddressSize) {        // A single location description describing the location of the object...        StringRef str = data.getData().substr(Offset, Bytes);        Offset += Bytes; -      E.Loc.reserve(str.size()); -      std::copy(str.begin(), str.end(), std::back_inserter(E.Loc)); +      E.Loc.append(str.begin(), str.end());        Loc.Entries.push_back(std::move(E));      }    } diff --git a/llvm/lib/Target/X86/X86InstrInfo.cpp b/llvm/lib/Target/X86/X86InstrInfo.cpp index f5b9680d0bb..ea4e25188da 100644 --- a/llvm/lib/Target/X86/X86InstrInfo.cpp +++ b/llvm/lib/Target/X86/X86InstrInfo.cpp @@ -5559,7 +5559,7 @@ X86InstrInfo::unfoldMemoryOperand(SelectionDAG &DAG, SDNode *N,    }    if (Load)      BeforeOps.push_back(SDValue(Load, 0)); -  std::copy(AfterOps.begin(), AfterOps.end(), std::back_inserter(BeforeOps)); +  BeforeOps.insert(BeforeOps.end(), AfterOps.begin(), AfterOps.end());    SDNode *NewNode= DAG.getMachineNode(Opc, dl, VTs, BeforeOps);    NewNodes.push_back(NewNode); diff --git a/llvm/lib/Transforms/Scalar/SROA.cpp b/llvm/lib/Transforms/Scalar/SROA.cpp index f69c750f3f9..3ab5973643c 100644 --- a/llvm/lib/Transforms/Scalar/SROA.cpp +++ b/llvm/lib/Transforms/Scalar/SROA.cpp @@ -247,7 +247,7 @@ public:    /// hold.    void insert(ArrayRef<Slice> NewSlices) {      int OldSize = Slices.size(); -    std::move(NewSlices.begin(), NewSlices.end(), std::back_inserter(Slices)); +    Slices.append(NewSlices.begin(), NewSlices.end());      auto SliceI = Slices.begin() + OldSize;      std::sort(SliceI, Slices.end());      std::inplace_merge(Slices.begin(), SliceI, Slices.end());  | 

