[llvm-commits] [poolalloc] r97038 - in /poolalloc/trunk: include/dsa/DSNode.h lib/DSA/DataStructure.cpp
alenhar2 at llvm.org
alenhar2 at llvm.org
Wed Feb 24 07:57:35 PST 2010
Author: alenhar2
Date: Wed Feb 24 09:57:35 2010
New Revision: 97038
URL: http://llvm.org/viewvc/llvm-project?rev=97038&view=rev
Log:
set NodeType and fix null type check
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=97038&r1=97037&r2=97038&view=diff
==============================================================================
--- poolalloc/trunk/include/dsa/DSNode.h (original)
+++ poolalloc/trunk/include/dsa/DSNode.h Wed Feb 24 09:57:35 2010
@@ -35,7 +35,7 @@
class DSNode : public ilist_node<DSNode> {
friend struct ilist_sentinel_traits<DSNode>;
//Sentinel
- DSNode() : NumReferrers(0), Size(0), Ty(0) {}
+ DSNode() : NumReferrers(0), Size(0), Ty(0), NodeType(0) {}
/// NumReferrers - The number of DSNodeHandles pointing to this node... if
/// this is a forwarding node, then this is the number of node handles which
Modified: poolalloc/trunk/lib/DSA/DataStructure.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/DataStructure.cpp?rev=97038&r1=97037&r2=97038&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/DataStructure.cpp (original)
+++ poolalloc/trunk/lib/DSA/DataStructure.cpp Wed Feb 24 09:57:35 2010
@@ -122,7 +122,7 @@
//===----------------------------------------------------------------------===//
DSNode::DSNode(const Type *T, DSGraph *G)
-: NumReferrers(0), Size(0), ParentGraph(G), Ty(0) {
+: NumReferrers(0), Size(0), ParentGraph(G), Ty(0), NodeType(0) {
// Add the type entry if it is specified...
if (T) mergeTypeInfo(T, 0);
if (G) G->addNode(this);
@@ -1206,7 +1206,7 @@
}
// Merge the type entries of the two nodes together...
- if ((SN->getType() || SN->getType()->getTypeID() != Type::VoidTyID)
+ if ((SN->getType() && SN->getType()->getTypeID() != Type::VoidTyID)
&& !DN->isNodeCompletelyFolded()) {
DN->mergeTypeInfo(SN->getType(), NH.getOffset() - SrcNH.getOffset());
DN = NH.getNode();
More information about the llvm-commits
mailing list