[llvm-commits] CVS: llvm/lib/Transforms/Scalar/SCCP.cpp
Chris Lattner
sabre at nondot.org
Fri Feb 2 14:36:32 PST 2007
Changes in directory llvm/lib/Transforms/Scalar:
SCCP.cpp updated: 1.160 -> 1.161
---
Log message:
Switch this back to using an std::map. DenseMap entries are getting invalidated
---
Diffs of the changes: (+5 -5)
SCCP.cpp | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
Index: llvm/lib/Transforms/Scalar/SCCP.cpp
diff -u llvm/lib/Transforms/Scalar/SCCP.cpp:1.160 llvm/lib/Transforms/Scalar/SCCP.cpp:1.161
--- llvm/lib/Transforms/Scalar/SCCP.cpp:1.160 Fri Feb 2 15:15:06 2007
+++ llvm/lib/Transforms/Scalar/SCCP.cpp Fri Feb 2 16:36:16 2007
@@ -138,7 +138,7 @@
///
class SCCPSolver : public InstVisitor<SCCPSolver> {
SmallSet<BasicBlock*, 16> BBExecutable;// The basic blocks that are executable
- DenseMap<Value*, LatticeVal> ValueState; // The state each value is in.
+ std::map<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
@@ -222,7 +222,7 @@
/// getValueMapping - Once we have solved for constants, return the mapping of
/// LLVM values to LatticeVals.
- DenseMap<Value*, LatticeVal> &getValueMapping() {
+ std::map<Value*, LatticeVal> &getValueMapping() {
return ValueState;
}
@@ -303,7 +303,7 @@
// Instruction object, then use this accessor to get its value from the map.
//
inline LatticeVal &getValueState(Value *V) {
- DenseMap<Value*, LatticeVal>::iterator I = ValueState.find(V);
+ std::map<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)) {
@@ -1364,7 +1364,7 @@
Solver.MarkBlockExecutable(F.begin());
// Mark all arguments to the function as being overdefined.
- DenseMap<Value*, LatticeVal> &Values = Solver.getValueMapping();
+ std::map<Value*, LatticeVal> &Values = Solver.getValueMapping();
for (Function::arg_iterator AI = F.arg_begin(), E = F.arg_end(); AI != E; ++AI)
Values[AI].markOverdefined();
@@ -1485,7 +1485,7 @@
// Loop over all functions, marking arguments to those with their addresses
// taken or that are external as overdefined.
//
- DenseMap<Value*, LatticeVal> &Values = Solver.getValueMapping();
+ std::map<Value*, LatticeVal> &Values = Solver.getValueMapping();
for (Module::iterator F = M.begin(), E = M.end(); F != E; ++F)
if (!F->hasInternalLinkage() || AddressIsTaken(F)) {
if (!F->isDeclaration())
More information about the llvm-commits
mailing list