[llvm-commits] CVS: llvm/lib/CodeGen/LiveVariables.cpp
Evan Cheng
evan.cheng at apple.com
Tue Jun 26 22:23:23 PDT 2007
Changes in directory llvm/lib/CodeGen:
LiveVariables.cpp updated: 1.85 -> 1.86
---
Log message:
Replace std::set with SmallPtrSet.
---
Diffs of the changes: (+5 -3)
LiveVariables.cpp | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
Index: llvm/lib/CodeGen/LiveVariables.cpp
diff -u llvm/lib/CodeGen/LiveVariables.cpp:1.85 llvm/lib/CodeGen/LiveVariables.cpp:1.86
--- llvm/lib/CodeGen/LiveVariables.cpp:1.85 Tue Jun 26 16:03:35 2007
+++ llvm/lib/CodeGen/LiveVariables.cpp Wed Jun 27 00:23:00 2007
@@ -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 @@
// 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.
More information about the llvm-commits
mailing list