mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-09 05:47:13 +00:00
Use a SmallSet when we can to reduce memory allocations.
This speeds up a particular testcase from 0.0302s to 0.0222s in LiveVariables. llvm-svn: 52819
This commit is contained in:
parent
59ed35b2c2
commit
e0604d46c2
@ -34,6 +34,7 @@
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
#include "llvm/ADT/DepthFirstIterator.h"
|
||||
#include "llvm/ADT/SmallPtrSet.h"
|
||||
#include "llvm/ADT/SmallSet.h"
|
||||
#include "llvm/ADT/STLExtras.h"
|
||||
#include "llvm/Config/alloca.h"
|
||||
#include <algorithm>
|
||||
@ -387,7 +388,7 @@ bool LiveVariables::HandlePhysRegKill(unsigned Reg) {
|
||||
|
||||
void LiveVariables::HandlePhysRegDef(unsigned Reg, MachineInstr *MI) {
|
||||
// What parts of the register are previously defined?
|
||||
std::set<unsigned> Live;
|
||||
SmallSet<unsigned, 32> Live;
|
||||
if (PhysRegDef[Reg] || PhysRegUse[Reg]) {
|
||||
Live.insert(Reg);
|
||||
for (const unsigned *SS = TRI->getSubRegisters(Reg); *SS; ++SS)
|
||||
|
Loading…
x
Reference in New Issue
Block a user