[llvm-commits] [llvm] r54810 - /llvm/trunk/lib/CodeGen/LiveVariables.cpp
Owen Anderson
resistor at mac.com
Thu Aug 14 16:41:39 PDT 2008
Author: resistor
Date: Thu Aug 14 18:41:38 2008
New Revision: 54810
URL: http://llvm.org/viewvc/llvm-project?rev=54810&view=rev
Log:
Use SmallSet instead of std::set to save allocations.
Modified:
llvm/trunk/lib/CodeGen/LiveVariables.cpp
Modified: llvm/trunk/lib/CodeGen/LiveVariables.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveVariables.cpp?rev=54810&r1=54809&r2=54810&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LiveVariables.cpp (original)
+++ llvm/trunk/lib/CodeGen/LiveVariables.cpp Thu Aug 14 18:41:38 2008
@@ -221,7 +221,7 @@
LastPartialDef->addOperand(MachineOperand::CreateReg(Reg, true/*IsDef*/,
true/*IsImp*/));
PhysRegDef[Reg] = LastPartialDef;
- std::set<unsigned> Processed;
+ SmallSet<unsigned, 8> Processed;
for (const unsigned *SubRegs = TRI->getSubRegisters(Reg);
unsigned SubReg = *SubRegs; ++SubRegs) {
if (Processed.count(SubReg))
@@ -351,7 +351,7 @@
// AX<dead> = AL<imp-def>
// = AL<kill>
// AX =
- std::set<unsigned> PartUses;
+ SmallSet<unsigned, 8> PartUses;
for (const unsigned *SubRegs = TRI->getSubRegisters(Reg);
unsigned SubReg = *SubRegs; ++SubRegs) {
if (MachineInstr *Use = PhysRegUse[SubReg]) {
@@ -437,7 +437,7 @@
if (MI) {
// Does this extend the live range of a super-register?
- std::set<unsigned> Processed;
+ SmallSet<unsigned, 8> Processed;
for (const unsigned *SuperRegs = TRI->getSuperRegisters(Reg);
unsigned SuperReg = *SuperRegs; ++SuperRegs) {
if (Processed.count(SuperReg))
More information about the llvm-commits
mailing list