[llvm-commits] CVS: poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sat Jan 31 17:43:01 PST 2004
Changes in directory poolalloc/lib/PoolAllocate:
TransformFunctionBody.cpp updated: 1.14 -> 1.15
---
Log message:
Make the pool allocator build with the recent changes to the DSGraph scalarmap
---
Diffs of the changes: (+3 -3)
Index: poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp
diff -u poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.14 poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.15
--- poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.14 Fri Nov 14 01:02:50 2003
+++ poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp Sat Jan 31 17:42:13 2004
@@ -156,9 +156,9 @@
// If we are modifying the original function, update the DSGraph...
if (MII != SM.end()) {
// V and Casted now point to whatever the original malloc did...
- SM.insert(std::make_pair(V, MII->second));
+ SM[V] = MII->second;
if (V != Casted)
- SM.insert(std::make_pair(Casted, MII->second));
+ SM[Casted] = MII->second;
SM.erase(MII); // The malloc is now destroyed
} else { // Otherwise, update the NewToOldValueMap
std::map<Value*,const Value*>::iterator MII =
@@ -342,7 +342,7 @@
DSGraph::ScalarMapTy &SM = G.getScalarMap();
DSGraph::ScalarMapTy::iterator CII = SM.find(TheCall);
if (CII != SM.end()) {
- SM.insert(std::make_pair(NewCall, CII->second));
+ SM[NewCall] = CII->second;
SM.erase(CII); // Destroy the CallInst
} else {
// Otherwise update the NewToOldValueMap with the new CI return value
More information about the llvm-commits
mailing list