[llvm-commits] [poolalloc] r106899 - /poolalloc/trunk/include/poolalloc/PoolAllocate.h
Patrick Simmons
simmon12 at illinois.edu
Fri Jun 25 15:35:28 PDT 2010
Author: psimmons
Date: Fri Jun 25 17:35:28 2010
New Revision: 106899
URL: http://llvm.org/viewvc/llvm-project?rev=106899&view=rev
Log:
Make ReversePoolDescriptors a multimap (PoolDescriptors is still wrong, so this still doesn't work)
Modified:
poolalloc/trunk/include/poolalloc/PoolAllocate.h
Modified: poolalloc/trunk/include/poolalloc/PoolAllocate.h
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/poolalloc/PoolAllocate.h?rev=106899&r1=106898&r2=106899&view=diff
==============================================================================
--- poolalloc/trunk/include/poolalloc/PoolAllocate.h (original)
+++ poolalloc/trunk/include/poolalloc/PoolAllocate.h Fri Jun 25 17:35:28 2010
@@ -92,7 +92,7 @@
// Reverse mapping for PoolDescriptors, needed by TPPA
// FIXME: There can be multiple DSNodes mapped to a single pool descriptor
- std::map<Value*, const DSNode*> ReversePoolDescriptors;
+ std::multimap<Value*, const DSNode*> ReversePoolDescriptors;
// This is a hack -- a function should be added which maintains these in parallel
// and all of PoolAlloc and SafeCode should be updated to use it instead of adding
@@ -105,7 +105,7 @@
rev_pool_desc_map_computed = true;
for(std::map<const DSNode*, Value*>::iterator i = PoolDescriptors.begin(); i!=PoolDescriptors.end(); i++)
- ReversePoolDescriptors[i->second] = i->first;
+ ReversePoolDescriptors.insert(std::pair<Value*,const DSNode*>(i->second,i->first));
}
/// This is a map from Old to New Values (the reverse of NewToOldValueMap).
More information about the llvm-commits
mailing list