[llvm-commits] [poolalloc] r40065 - in /poolalloc/branches/SVA: include/dsa/DSNode.h lib/DSA/Local.cpp lib/DSA/TopDownClosure.cpp
Andrew Lenharth
alenhar2 at cs.uiuc.edu
Thu Jul 19 13:01:53 PDT 2007
Author: alenhar2
Date: Thu Jul 19 15:01:53 2007
New Revision: 40065
URL: http://llvm.org/viewvc/llvm-project?rev=40065&view=rev
Log:
td sets metapool flags as a pass over the graphs
Modified:
poolalloc/branches/SVA/include/dsa/DSNode.h
poolalloc/branches/SVA/lib/DSA/Local.cpp
poolalloc/branches/SVA/lib/DSA/TopDownClosure.cpp
Modified: poolalloc/branches/SVA/include/dsa/DSNode.h
URL: http://llvm.org/viewvc/llvm-project/poolalloc/branches/SVA/include/dsa/DSNode.h?rev=40065&r1=40064&r2=40065&view=diff
==============================================================================
--- poolalloc/branches/SVA/include/dsa/DSNode.h (original)
+++ poolalloc/branches/SVA/include/dsa/DSNode.h Thu Jul 19 15:01:53 2007
@@ -420,16 +420,16 @@
bool isDeadNode() const { return NodeType & DEAD; }
bool isExternalNode() const { return NodeType & External; }
- DSNode *setAllocaNodeMarker() { NodeType |= AllocaNode; getMP()->addFlags(NodeType); return this; }
- DSNode *setHeapNodeMarker() { NodeType |= HeapNode; getMP()->addFlags(NodeType); return this; }
- DSNode *setGlobalNodeMarker() { NodeType |= GlobalNode; getMP()->addFlags(NodeType); return this; }
+ DSNode *setAllocaNodeMarker() { NodeType |= AllocaNode; return this; }
+ DSNode *setHeapNodeMarker() { NodeType |= HeapNode; return this; }
+ DSNode *setGlobalNodeMarker() { NodeType |= GlobalNode; return this; }
DSNode *setUnknownNodeMarker(); // { ++stat_unknown; NodeType |= UnknownNode; return this; }
- DSNode *setExternalMarker() { NodeType |= External; getMP()->addFlags(NodeType); return this; }
- DSNode *setIncompleteMarker() { NodeType |= Incomplete; getMP()->addFlags(NodeType); return this; }
- DSNode *setModifiedMarker() { NodeType |= Modified; getMP()->addFlags(NodeType); return this; }
- DSNode *setReadMarker() { NodeType |= Read; getMP()->addFlags(NodeType); return this; }
- DSNode *setArrayMarker() { NodeType |= Array; getMP()->addFlags(NodeType); return this; }
+ DSNode *setExternalMarker() { NodeType |= External; return this; }
+ DSNode *setIncompleteMarker() { NodeType |= Incomplete; return this; }
+ DSNode *setModifiedMarker() { NodeType |= Modified; return this; }
+ DSNode *setReadMarker() { NodeType |= Read; return this; }
+ DSNode *setArrayMarker() { NodeType |= Array; return this; }
void makeNodeDead() {
Globals.clear();
Modified: poolalloc/branches/SVA/lib/DSA/Local.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/branches/SVA/lib/DSA/Local.cpp?rev=40065&r1=40064&r2=40065&view=diff
==============================================================================
--- poolalloc/branches/SVA/lib/DSA/Local.cpp (original)
+++ poolalloc/branches/SVA/lib/DSA/Local.cpp Thu Jul 19 15:01:53 2007
@@ -56,7 +56,6 @@
++CrashCur;
++stat_unknown;
NodeType |= UnknownNode;
- getMP()->addFlags(NodeType);
return this;
}
@@ -1668,8 +1667,11 @@
AllocList.push_back("__vmalloc");
AllocList.push_back("kmem_cache_alloc");
AllocList.push_back("__alloc_bootmem");
+ AllocList.push_back(" __get_free_pages");
+
FreeList.push_back("kfree");
FreeList.push_back("vfree");
+ FreeList.push_back("free_pages");
//figure out all system call numbers
Function* lrs = M.getNamedFunction("llva_register_syscall");
Modified: poolalloc/branches/SVA/lib/DSA/TopDownClosure.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/branches/SVA/lib/DSA/TopDownClosure.cpp?rev=40065&r1=40064&r2=40065&view=diff
==============================================================================
--- poolalloc/branches/SVA/lib/DSA/TopDownClosure.cpp (original)
+++ poolalloc/branches/SVA/lib/DSA/TopDownClosure.cpp Thu Jul 19 15:01:53 2007
@@ -141,6 +141,15 @@
ArgsRemainIncomplete.clear();
GlobalsGraph->removeTriviallyDeadNodes();
+
+ for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
+ if (!I->isExternal()) {
+ DSGraph& G = getOrCreateDSGraph(*I);
+ for (DSGraph::node_iterator ii = G.node_begin(), ee = G.node_end();
+ ii != ee; ++ii)
+ ii->getMP()->addFlags(ii->getNodeFlags());
+ }
+
return false;
}
More information about the llvm-commits
mailing list