From: Chris Lattner Date: Tue, 23 Jan 2007 00:59:48 +0000 (+0000) Subject: Switch this to use SmallSet to avoid mallocs in the common case. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=08a4d5a343e886816b31a78d9b7e70240d9c67be;p=oota-llvm.git Switch this to use SmallSet to avoid mallocs in the common case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33457 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/VirtRegMap.cpp b/lib/CodeGen/VirtRegMap.cpp index 1d1f6f75cba..8fb26a95cee 100644 --- a/lib/CodeGen/VirtRegMap.cpp +++ b/lib/CodeGen/VirtRegMap.cpp @@ -29,8 +29,8 @@ #include "llvm/Support/Compiler.h" #include "llvm/ADT/Statistic.h" #include "llvm/ADT/STLExtras.h" +#include "llvm/ADT/SmallSet.h" #include -#include using namespace llvm; STATISTIC(NumSpills, "Number of register spills"); @@ -471,7 +471,7 @@ namespace { unsigned GetRegForReload(unsigned PhysReg, MachineInstr *MI, AvailableSpills &Spills, std::map &MaybeDeadStores, - std::set &Rejected) { + SmallSet &Rejected) { if (Reuses.empty()) return PhysReg; // This is most often empty. for (unsigned ro = 0, e = Reuses.size(); ro != e; ++ro) { @@ -553,7 +553,7 @@ namespace { unsigned GetRegForReload(unsigned PhysReg, MachineInstr *MI, AvailableSpills &Spills, std::map &MaybeDeadStores) { - std::set Rejected; + SmallSet Rejected; return GetRegForReload(PhysReg, MI, Spills, MaybeDeadStores, Rejected); } };