Replace std::set with SmallPtrSet.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37746 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng 2007-06-27 05:23:00 +00:00
parent 62cf8babdb
commit 041040717d

View File

@ -32,6 +32,7 @@
#include "llvm/Target/TargetInstrInfo.h" #include "llvm/Target/TargetInstrInfo.h"
#include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetMachine.h"
#include "llvm/ADT/DepthFirstIterator.h" #include "llvm/ADT/DepthFirstIterator.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/STLExtras.h" #include "llvm/ADT/STLExtras.h"
#include "llvm/Config/alloca.h" #include "llvm/Config/alloca.h"
#include <algorithm> #include <algorithm>
@ -424,9 +425,10 @@ bool LiveVariables::runOnMachineFunction(MachineFunction &mf) {
// nodes, which are treated as a special case). // nodes, which are treated as a special case).
// //
MachineBasicBlock *Entry = MF->begin(); MachineBasicBlock *Entry = MF->begin();
std::set<MachineBasicBlock*> Visited; SmallPtrSet<MachineBasicBlock*,16> Visited;
for (df_ext_iterator<MachineBasicBlock*> DFI = df_ext_begin(Entry, Visited), for (df_ext_iterator<MachineBasicBlock*, SmallPtrSet<MachineBasicBlock*,16> >
E = df_ext_end(Entry, Visited); DFI != E; ++DFI) { DFI = df_ext_begin(Entry, Visited), E = df_ext_end(Entry, Visited);
DFI != E; ++DFI) {
MachineBasicBlock *MBB = *DFI; MachineBasicBlock *MBB = *DFI;
// Mark live-in registers as live-in. // Mark live-in registers as live-in.