[llvm-commits] [poolalloc] r126660 - /poolalloc/trunk/lib/DSA/Local.cpp
Arushi Aggarwal
aggarwa4 at illinois.edu
Mon Feb 28 09:45:15 PST 2011
Author: aggarwa4
Date: Mon Feb 28 11:45:15 2011
New Revision: 126660
URL: http://llvm.org/viewvc/llvm-project?rev=126660&view=rev
Log:
1. Make GraphBuilder depend on LocalDataStructure,
instead of DataStructure, as that is the only pass
that uses it.
2. Create a DSNode, even if a GEP is not used.
Modified:
poolalloc/trunk/lib/DSA/Local.cpp
Modified: poolalloc/trunk/lib/DSA/Local.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/Local.cpp?rev=126660&r1=126659&r2=126660&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/Local.cpp (original)
+++ poolalloc/trunk/lib/DSA/Local.cpp Mon Feb 28 11:45:15 2011
@@ -68,7 +68,7 @@
class GraphBuilder : InstVisitor<GraphBuilder> {
DSGraph &G;
Function* FB;
- DataStructures* DS;
+ LocalDataStructures* DS;
const TargetData& TD;
////////////////////////////////////////////////////////////////////////////
@@ -135,7 +135,7 @@
void visitVAStartNode(DSNode* N);
public:
- GraphBuilder(Function &f, DSGraph &g, DataStructures& DSi)
+ GraphBuilder(Function &f, DSGraph &g, LocalDataStructures& DSi)
: G(g), FB(&f), DS(&DSi), TD(g.getTargetData()) {
// Create scalar nodes for all pointer arguments...
for (Function::arg_iterator I = f.arg_begin(), E = f.arg_end();
@@ -499,8 +499,6 @@
return;
}
- if(GEP.use_empty())
- return;
//
// Okay, no easy way out. Calculate the offset into the object being
// indexed.
@@ -571,7 +569,6 @@
if((Value.getOffset() || Offset != 0)
|| (!isa<ArrayType>(CurTy)
&& (Value.getNode()->getSize() != TD.getTypeAllocSize(CurTy)))) {
-
Value.getNode()->foldNodeCompletely();
Value.getNode();
Offset = 0;
@@ -1172,7 +1169,6 @@
GGB.mergeInGlobalInitializer(I);
}
// Add Functions to the globals graph.
- // FIXME: Write a separate pass to handle address taken property better.
for (Module::iterator FI = M.begin(), FE = M.end(); FI != FE; ++FI){
if(addrAnalysis->hasAddressTaken(FI)) {
GGB.mergeFunction(FI);
More information about the llvm-commits
mailing list