diff options
| author | Chris Lattner <sabre@nondot.org> | 2007-01-23 00:59:48 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2007-01-23 00:59:48 +0000 |
| commit | 199818475b68c48b23d26b81a88d047609535765 (patch) | |
| tree | e51071046e21c4df4c94a953a44408bd93235bce /llvm/lib/CodeGen | |
| parent | d51b3ca3ad82c049581d47ce35289166836a63eb (diff) | |
| download | bcm5719-llvm-199818475b68c48b23d26b81a88d047609535765.tar.gz bcm5719-llvm-199818475b68c48b23d26b81a88d047609535765.zip | |
Switch this to use SmallSet to avoid mallocs in the common case.
llvm-svn: 33457
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/VirtRegMap.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/VirtRegMap.cpp b/llvm/lib/CodeGen/VirtRegMap.cpp index 1d1f6f75cba..8fb26a95cee 100644 --- a/llvm/lib/CodeGen/VirtRegMap.cpp +++ b/llvm/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 <algorithm> -#include <set> using namespace llvm; STATISTIC(NumSpills, "Number of register spills"); @@ -471,7 +471,7 @@ namespace { unsigned GetRegForReload(unsigned PhysReg, MachineInstr *MI, AvailableSpills &Spills, std::map<int, MachineInstr*> &MaybeDeadStores, - std::set<unsigned> &Rejected) { + SmallSet<unsigned, 8> &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<int, MachineInstr*> &MaybeDeadStores) { - std::set<unsigned> Rejected; + SmallSet<unsigned, 8> Rejected; return GetRegForReload(PhysReg, MI, Spills, MaybeDeadStores, Rejected); } }; |

