diff options
author | Devang Patel <dpatel@apple.com> | 2008-08-14 21:31:10 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2008-08-14 21:31:10 +0000 |
commit | 1df183f554eb742e874ebc14af60694540e5d0f8 (patch) | |
tree | 2784fcbb576492bbd60e5fea40c033a11c6ab886 | |
parent | 183cc32e49aa6641a39347075c8240cea92a6c63 (diff) | |
download | external_llvm-1df183f554eb742e874ebc14af60694540e5d0f8.zip external_llvm-1df183f554eb742e874ebc14af60694540e5d0f8.tar.gz external_llvm-1df183f554eb742e874ebc14af60694540e5d0f8.tar.bz2 |
Use DenseMap. Patch by Pratik Solanki.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54792 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Transforms/Scalar/SCCP.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Transforms/Scalar/SCCP.cpp b/lib/Transforms/Scalar/SCCP.cpp index 8c64d8f..91e4d14 100644 --- a/lib/Transforms/Scalar/SCCP.cpp +++ b/lib/Transforms/Scalar/SCCP.cpp @@ -138,7 +138,7 @@ public: /// class SCCPSolver : public InstVisitor<SCCPSolver> { SmallSet<BasicBlock*, 16> BBExecutable;// The basic blocks that are executable - std::map<Value*, LatticeVal> ValueState; // The state each value is in. + DenseMap<Value*, LatticeVal> ValueState; // The state each value is in. /// GlobalValue - If we are tracking any values for the contents of a global /// variable, we keep a mapping from the constant accessor to the element of @@ -231,7 +231,7 @@ public: /// getValueMapping - Once we have solved for constants, return the mapping of /// LLVM values to LatticeVals. - std::map<Value*, LatticeVal> &getValueMapping() { + DenseMap<Value*, LatticeVal> &getValueMapping() { return ValueState; } @@ -311,7 +311,7 @@ private: // Instruction object, then use this accessor to get its value from the map. // inline LatticeVal &getValueState(Value *V) { - std::map<Value*, LatticeVal>::iterator I = ValueState.find(V); + DenseMap<Value*, LatticeVal>::iterator I = ValueState.find(V); if (I != ValueState.end()) return I->second; // Common case, in the map if (Constant *C = dyn_cast<Constant>(V)) { @@ -1555,7 +1555,7 @@ bool SCCP::runOnFunction(Function &F) { // SmallSet<BasicBlock*, 16> &ExecutableBBs = Solver.getExecutableBlocks(); SmallVector<Instruction*, 32> Insts; - std::map<Value*, LatticeVal> &Values = Solver.getValueMapping(); + DenseMap<Value*, LatticeVal> &Values = Solver.getValueMapping(); for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB) if (!ExecutableBBs.count(BB)) { @@ -1701,7 +1701,7 @@ bool IPSCCP::runOnModule(Module &M) { SmallSet<BasicBlock*, 16> &ExecutableBBs = Solver.getExecutableBlocks(); SmallVector<Instruction*, 32> Insts; SmallVector<BasicBlock*, 32> BlocksToErase; - std::map<Value*, LatticeVal> &Values = Solver.getValueMapping(); + DenseMap<Value*, LatticeVal> &Values = Solver.getValueMapping(); for (Module::iterator F = M.begin(), E = M.end(); F != E; ++F) { for (Function::arg_iterator AI = F->arg_begin(), E = F->arg_end(); |