[llvm-commits] [poolalloc] r74635 - /poolalloc/trunk/lib/DSA/Basic.cpp
Haohui Mai
mai4 at uiuc.edu
Wed Jul 1 13:26:52 PDT 2009
Author: mai4
Date: Wed Jul 1 15:26:50 2009
New Revision: 74635
URL: http://llvm.org/viewvc/llvm-project?rev=74635&view=rev
Log:
Make the dummy DSA pass handle arguments too.
Modified:
poolalloc/trunk/lib/DSA/Basic.cpp
Modified: poolalloc/trunk/lib/DSA/Basic.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/Basic.cpp?rev=74635&r1=74634&r2=74635&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/Basic.cpp (original)
+++ poolalloc/trunk/lib/DSA/Basic.cpp Wed Jul 1 15:26:50 2009
@@ -58,6 +58,18 @@
if (!F->isDeclaration()) {
DSGraph* G = new DSGraph(GlobalECs, getTargetData(), GlobalsGraph);
DSNode * Node = new DSNode(PointerType::getUnqual(Type::Int8Ty), G);
+
+ if (!F->hasInternalLinkage())
+ Node->setExternalMarker();
+
+ // Create scalar nodes for all pointer arguments...
+ for (Function::arg_iterator I = F->arg_begin(), E = F->arg_end();
+ I != E; ++I) {
+ if (isa<PointerType>(I->getType())) {
+ G->getNodeForValue(&*I).mergeWith(Node);
+ }
+ }
+
for (inst_iterator I = inst_begin(F), E = inst_end(F); I != E; ++I) {
G->getNodeForValue(&*I).mergeWith(Node);
}
More information about the llvm-commits
mailing list