From: Owen Anderson Date: Thu, 14 Aug 2008 23:41:38 +0000 (+0000) Subject: Use SmallSet instead of std::set to save allocations. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=bbf55832831482a73fa59fcd1746f9272e82a144;p=oota-llvm.git Use SmallSet instead of std::set to save allocations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54810 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/LiveVariables.cpp b/lib/CodeGen/LiveVariables.cpp index dbe650c0af8..00a5869cc17 100644 --- a/lib/CodeGen/LiveVariables.cpp +++ b/lib/CodeGen/LiveVariables.cpp @@ -221,7 +221,7 @@ void LiveVariables::HandlePhysRegUse(unsigned Reg, MachineInstr *MI) { LastPartialDef->addOperand(MachineOperand::CreateReg(Reg, true/*IsDef*/, true/*IsImp*/)); PhysRegDef[Reg] = LastPartialDef; - std::set Processed; + SmallSet Processed; for (const unsigned *SubRegs = TRI->getSubRegisters(Reg); unsigned SubReg = *SubRegs; ++SubRegs) { if (Processed.count(SubReg)) @@ -351,7 +351,7 @@ bool LiveVariables::HandlePhysRegKill(unsigned Reg) { // AX = AL // = AL // AX = - std::set PartUses; + SmallSet PartUses; for (const unsigned *SubRegs = TRI->getSubRegisters(Reg); unsigned SubReg = *SubRegs; ++SubRegs) { if (MachineInstr *Use = PhysRegUse[SubReg]) { @@ -437,7 +437,7 @@ void LiveVariables::HandlePhysRegDef(unsigned Reg, MachineInstr *MI) { if (MI) { // Does this extend the live range of a super-register? - std::set Processed; + SmallSet Processed; for (const unsigned *SuperRegs = TRI->getSuperRegisters(Reg); unsigned SuperReg = *SuperRegs; ++SuperRegs) { if (Processed.count(SuperReg))