diff --git a/lib/CodeGen/UnreachableBlockElim.cpp b/lib/CodeGen/UnreachableBlockElim.cpp index 152f2f84e8d..7bf95bf96e5 100644 --- a/lib/CodeGen/UnreachableBlockElim.cpp +++ b/lib/CodeGen/UnreachableBlockElim.cpp @@ -32,6 +32,7 @@ #include "llvm/Support/Compiler.h" #include "llvm/Target/TargetInstrInfo.h" #include "llvm/ADT/DepthFirstIterator.h" +#include "llvm/ADT/SmallPtrSet.h" using namespace llvm; namespace { @@ -51,11 +52,11 @@ FunctionPass *llvm::createUnreachableBlockEliminationPass() { } bool UnreachableBlockElim::runOnFunction(Function &F) { - std::set Reachable; + SmallPtrSet Reachable; // Mark all reachable blocks. - for (df_ext_iterator I = df_ext_begin(&F, Reachable), - E = df_ext_end(&F, Reachable); I != E; ++I) + for (df_ext_iterator > I = + df_ext_begin(&F, Reachable), E = df_ext_end(&F, Reachable); I != E; ++I) /* Mark all reachable blocks */; // Loop over all dead blocks, remembering them and deleting all instructions @@ -101,11 +102,12 @@ Y("unreachable-mbb-elimination", const PassInfo *const llvm::UnreachableMachineBlockElimID = &Y; bool UnreachableMachineBlockElim::runOnMachineFunction(MachineFunction &F) { - std::set Reachable; + SmallPtrSet Reachable; // Mark all reachable blocks. - for (df_ext_iterator I = df_ext_begin(&F, Reachable), - E = df_ext_end(&F, Reachable); I != E; ++I) + for (df_ext_iterator > + I = df_ext_begin(&F, Reachable), E = df_ext_end(&F, Reachable); + I != E; ++I) /* Mark all reachable blocks */; // Loop over all dead blocks, remembering them and deleting all instructions diff --git a/lib/Target/X86/X86FloatingPoint.cpp b/lib/Target/X86/X86FloatingPoint.cpp index 84ed6bae2c6..7dadd44b1ce 100644 --- a/lib/Target/X86/X86FloatingPoint.cpp +++ b/lib/Target/X86/X86FloatingPoint.cpp @@ -40,11 +40,11 @@ #include "llvm/Support/Debug.h" #include "llvm/Support/Compiler.h" #include "llvm/ADT/DepthFirstIterator.h" +#include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/Statistic.h" #include "llvm/ADT/STLExtras.h" #include -#include using namespace llvm; STATISTIC(NumFXCH, "Number of fxch instructions inserted"); @@ -192,11 +192,11 @@ bool FPS::runOnMachineFunction(MachineFunction &MF) { // Process the function in depth first order so that we process at least one // of the predecessors for every reachable block in the function. - std::set Processed; + SmallPtrSet Processed; MachineBasicBlock *Entry = MF.begin(); bool Changed = false; - for (df_ext_iterator > + for (df_ext_iterator > I = df_ext_begin(Entry, Processed), E = df_ext_end(Entry, Processed); I != E; ++I) Changed |= processBasicBlock(MF, **I);