Disable the parent graph code when not compiled in DEBUG mode
authorChris Lattner <sabre@nondot.org>
Wed, 2 Jul 2003 04:33:55 +0000 (04:33 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 2 Jul 2003 04:33:55 +0000 (04:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7056 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Analysis/DSNode.h
include/llvm/Analysis/DataStructure/DSNode.h

index 7d91918dba11d392c83b8b095308f7eb99645720..f4d71d403075327dc73d1743ad82e2ec606aa37e 100644 (file)
@@ -9,6 +9,10 @@
 
 #include "llvm/Analysis/DSSupport.h"
 
+#ifndef NDEBUG
+#define INCLUDE_PARENT_GRAPH 1
+#endif
+
 template<typename BaseType>
 class DSNodeIterator;          // Data structure graph traversal iterator
 
@@ -37,9 +41,11 @@ class DSNode {
   ///
   unsigned Size;
 
+#ifdef INCLUDE_PARENT_GRAPH
   /// ParentGraph - The graph this node is currently embedded into.
   ///
   DSGraph *ParentGraph;
+#endif
 
   /// Ty - Keep track of the current outer most type of this object, in addition
   /// to whether or not it has been indexed like an array or not.  If the
@@ -124,9 +130,10 @@ public:
   /// return the number of nodes forwarding over the node!
   unsigned getNumReferrers() const { return NumReferrers; }
 
+#ifdef INCLUDE_PARENT_GRAPH
   DSGraph *getParentGraph() const { return ParentGraph; }
   void setParentGraph(DSGraph *G) { ParentGraph = G; }
-
+#endif
 
   /// getForwardNode - This method returns the node that this node is forwarded
   /// to, if any.
index 7d91918dba11d392c83b8b095308f7eb99645720..f4d71d403075327dc73d1743ad82e2ec606aa37e 100644 (file)
@@ -9,6 +9,10 @@
 
 #include "llvm/Analysis/DSSupport.h"
 
+#ifndef NDEBUG
+#define INCLUDE_PARENT_GRAPH 1
+#endif
+
 template<typename BaseType>
 class DSNodeIterator;          // Data structure graph traversal iterator
 
@@ -37,9 +41,11 @@ class DSNode {
   ///
   unsigned Size;
 
+#ifdef INCLUDE_PARENT_GRAPH
   /// ParentGraph - The graph this node is currently embedded into.
   ///
   DSGraph *ParentGraph;
+#endif
 
   /// Ty - Keep track of the current outer most type of this object, in addition
   /// to whether or not it has been indexed like an array or not.  If the
@@ -124,9 +130,10 @@ public:
   /// return the number of nodes forwarding over the node!
   unsigned getNumReferrers() const { return NumReferrers; }
 
+#ifdef INCLUDE_PARENT_GRAPH
   DSGraph *getParentGraph() const { return ParentGraph; }
   void setParentGraph(DSGraph *G) { ParentGraph = G; }
-
+#endif
 
   /// getForwardNode - This method returns the node that this node is forwarded
   /// to, if any.