mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-18 17:39:04 +00:00
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
This commit is contained in:
parent
89502f0869
commit
08a4d5a343
@ -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);
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user