diff options
author | Chris Lattner <sabre@nondot.org> | 2002-11-08 01:22:26 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-11-08 01:22:26 +0000 |
commit | df2f35ee2b22ab964995a28a38665e70b3f4a443 (patch) | |
tree | 26aab00eff3bec79f917b17eb37ed55a7ca2f599 | |
parent | 33312f7031058a2ea18c4648b70af9d96a00adc7 (diff) |
Add flag that may be used to determine if dead nodes are used. It's temporary
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4620 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/Analysis/DSNode.h | 5 | ||||
-rw-r--r-- | include/llvm/Analysis/DataStructure/DSNode.h | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/include/llvm/Analysis/DSNode.h b/include/llvm/Analysis/DSNode.h index 403b4fa23a..346188da88 100644 --- a/include/llvm/Analysis/DSNode.h +++ b/include/llvm/Analysis/DSNode.h @@ -56,6 +56,9 @@ public: Incomplete = 1 << 4, // This node may not be complete Modified = 1 << 5, // This node is modified in this context Read = 1 << 6, // This node is read in this context +#if 1 + DEAD = 1 << 7, // This node is dead and should not be pointed to +#endif }; /// NodeType - A union of the above bits. "Shadow" nodes do not add any flags @@ -208,11 +211,11 @@ private: //===----------------------------------------------------------------------===// // Define inline DSNodeHandle functions that depend on the definition of DSNode // - inline void DSNodeHandle::setNode(DSNode *n) { if (N) N->removeReferrer(this); N = n; if (N) N->addReferrer(this); + assert(!N || ((N->NodeType & DSNode::DEAD) == 0)); } inline bool DSNodeHandle::hasLink(unsigned Num) const { diff --git a/include/llvm/Analysis/DataStructure/DSNode.h b/include/llvm/Analysis/DataStructure/DSNode.h index 403b4fa23a..346188da88 100644 --- a/include/llvm/Analysis/DataStructure/DSNode.h +++ b/include/llvm/Analysis/DataStructure/DSNode.h @@ -56,6 +56,9 @@ public: Incomplete = 1 << 4, // This node may not be complete Modified = 1 << 5, // This node is modified in this context Read = 1 << 6, // This node is read in this context +#if 1 + DEAD = 1 << 7, // This node is dead and should not be pointed to +#endif }; /// NodeType - A union of the above bits. "Shadow" nodes do not add any flags @@ -208,11 +211,11 @@ private: //===----------------------------------------------------------------------===// // Define inline DSNodeHandle functions that depend on the definition of DSNode // - inline void DSNodeHandle::setNode(DSNode *n) { if (N) N->removeReferrer(this); N = n; if (N) N->addReferrer(this); + assert(!N || ((N->NodeType & DSNode::DEAD) == 0)); } inline bool DSNodeHandle::hasLink(unsigned Num) const { |