[llvm-commits] [poolalloc] r49175 - /poolalloc/trunk/include/poolalloc/PoolAllocate.h
John Criswell
criswell at uiuc.edu
Thu Apr 3 10:37:28 PDT 2008
Author: criswell
Date: Thu Apr 3 12:37:28 2008
New Revision: 49175
URL: http://llvm.org/viewvc/llvm-project?rev=49175&view=rev
Log:
Added the getPool() virtual methods so that SAFECode can query pool allocation
as to which pools are assigned to DSNodes.
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=49175&r1=49174&r2=49175&view=diff
==============================================================================
--- poolalloc/trunk/include/poolalloc/PoolAllocate.h (original)
+++ poolalloc/trunk/include/poolalloc/PoolAllocate.h Thu Apr 3 12:37:28 2008
@@ -226,6 +226,16 @@
return ECGraphs->getGlobalsGraph ();
}
+ virtual Value * getPool (const DSNode * N, Function & F) {
+ PA::FuncInfo * FI = getFuncInfoOrClone (F);
+ std::map<const DSNode*, Value*>::iterator I = FI->PoolDescriptors.find(N);
+ if (I != FI->PoolDescriptors.end()) {
+ return I->second;
+ }
+
+ return 0;
+ }
+
virtual Value * getGlobalPool (const DSNode * Node) {
std::map<const DSNode *, Value *>::iterator I = GlobalNodes.find (Node);
if (I == GlobalNodes.end())
@@ -335,6 +345,10 @@
virtual Value * getGlobalPool (const DSNode * Node) {
return TheGlobalPool;
}
+
+ virtual Value * getPool (const DSNode * N, Function & F) {
+ return TheGlobalPool;
+ }
};
}
More information about the llvm-commits
mailing list