[llvm-commits] [poolalloc] r127199 - in /poolalloc/trunk: include/dsa/DSNode.h lib/DSA/DataStructure.cpp
Arushi Aggarwal
aggarwa4 at illinois.edu
Mon Mar 7 17:27:06 PST 2011
Author: aggarwa4
Date: Mon Mar 7 19:27:06 2011
New Revision: 127199
URL: http://llvm.org/viewvc/llvm-project?rev=127199&view=rev
Log:
Added a utility function to get all the values
associated with a DSNode.
Removed dead code.
Modified:
poolalloc/trunk/include/dsa/DSNode.h
poolalloc/trunk/lib/DSA/DataStructure.cpp
Modified: poolalloc/trunk/include/dsa/DSNode.h
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/dsa/DSNode.h?rev=127199&r1=127198&r2=127199&view=diff
==============================================================================
--- poolalloc/trunk/include/dsa/DSNode.h (original)
+++ poolalloc/trunk/include/dsa/DSNode.h Mon Mar 7 19:27:06 2011
@@ -241,7 +241,6 @@
void mergeTypeInfo(const Type *Ty, unsigned Offset);
void mergeTypeInfo(const TyMapTy::mapped_type TyIt, unsigned Offset);
void mergeTypeInfo(const DSNode* D, unsigned Offset);
- void mergeArrayTypeInfo(const DSNode* D);
// Types records might exist without types in them
bool hasNoType() {
@@ -328,6 +327,9 @@
globals_iterator globals_begin() const { return Globals.begin(); }
globals_iterator globals_end() const { return Globals.end(); }
+ /// addValueList - Compute a full set of values that are represented by
+ /// this node. High overhead method.
+ void addValueList(std::vector<const Value*> &List) const;
/// maskNodeTypes - Apply a mask to the node types bitfield.
///
Modified: poolalloc/trunk/lib/DSA/DataStructure.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/DataStructure.cpp?rev=127199&r1=127198&r2=127199&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/DataStructure.cpp (original)
+++ poolalloc/trunk/lib/DSA/DataStructure.cpp Mon Mar 7 19:27:06 2011
@@ -272,6 +272,15 @@
return isCollapsedNode();
}
+void DSNode::addValueList(std::vector<const Value*> &List) const {
+ DSScalarMap &SN = getParentGraph()->getScalarMap();
+ for(DSScalarMap::const_iterator I = SN.begin(), E = SN.end(); I!= E; I++) {
+ if(SN[I->first].getNode() == this){
+ //I->first->dump();
+ }
+
+ }
+}
/// addFullGlobalsList - Compute the full set of global values that are
/// represented by this node. Unlike getGlobalsList(), this requires fair
/// amount of work to compute, so don't treat this method call as free.
@@ -446,13 +455,6 @@
mergeTypeInfo(ii->second, ii->first + Offset);
}
-void DSNode::mergeArrayTypeInfo(const DSNode* DN) {
- unsigned Offset = 0;
- while(Offset < getSize()) {
- mergeTypeInfo(DN, Offset);
- Offset += DN->getSize();
- }
-}
/// addEdgeTo - Add an edge from the current node to the specified node. This
/// can cause merging of nodes in the graph.
///
More information about the llvm-commits
mailing list