Replace std::set with SmallPtrSet.
authorEvan Cheng <evan.cheng@apple.com>
Wed, 27 Jun 2007 05:23:00 +0000 (05:23 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Wed, 27 Jun 2007 05:23:00 +0000 (05:23 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37746 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/LiveVariables.cpp

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