aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Analysis/DataStructure/DataStructure.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-04-16 20:39:23 +0000
committerChris Lattner <sabre@nondot.org>2002-04-16 20:39:23 +0000
commit28c238636ea663419f35319bcedc445d08995e57 (patch)
treed5fc3098b30a8a3695588de774f3cf9f5ceeb043 /include/llvm/Analysis/DataStructure/DataStructure.h
parent7523a107d907fe8eb470681b62139bb0360e9559 (diff)
Remove the concept of a critical shadow node
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2265 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/DataStructure/DataStructure.h')
-rw-r--r--include/llvm/Analysis/DataStructure/DataStructure.h20
1 files changed, 6 insertions, 14 deletions
diff --git a/include/llvm/Analysis/DataStructure/DataStructure.h b/include/llvm/Analysis/DataStructure/DataStructure.h
index dd51909a2d..e619f6b360 100644
--- a/include/llvm/Analysis/DataStructure/DataStructure.h
+++ b/include/llvm/Analysis/DataStructure/DataStructure.h
@@ -118,7 +118,7 @@ class DSNode {
void operator=(const DSNode &); // DO NOT IMPLEMENT
public:
enum NodeTy {
- NewNode, CallNode, ShadowNode, ArgNode, GlobalNode
+ NewNode, CallNode, ShadowNode, GlobalNode
} NodeType;
DSNode(enum NodeTy NT, const Type *T);
@@ -254,6 +254,9 @@ class CallDSNode : public DSNode {
std::vector<PointerValSet> ArgLinks;
public:
CallDSNode(CallInst *CI);
+ ~CallDSNode() {
+ ArgLinks.clear();
+ }
CallInst *getCall() const { return CI; }
@@ -315,21 +318,13 @@ private:
// to. When functions are integrated into each other, shadow nodes are
// resolved.
//
-// Shadow nodes may be marked as "critical" nodes when they are created. This
-// mark indicates that the node is the result of a function call, the value
-// pointed to by an incoming argument, or the value pointed to by a global
-// variable [fixme todo]. Since it is not possible to know what these nodes
-// point to, given just the current context, they are marked "Critical" to avoid
-// having the shadow node merger eliminate them.
-//
class ShadowDSNode : public DSNode {
friend class FunctionDSGraph;
Module *Mod;
ShadowDSNode *ShadowParent; // Nonnull if this is a synthesized node...
std::vector<std::pair<const Type *, ShadowDSNode *> > SynthNodes;
- bool CriticalNode;
public:
- ShadowDSNode(const Type *Ty, Module *M, bool Critical = false);
+ ShadowDSNode(const Type *Ty, Module *M);
virtual std::string getCaption() const;
// synthesizeNode - Create a new shadow node that is to be linked into this
@@ -337,9 +332,6 @@ public:
//
ShadowDSNode *synthesizeNode(const Type *Ty, FunctionRepBuilder *Rep);
- bool isCriticalNode() const { return CriticalNode; }
- void resetCriticalMark() { CriticalNode = false; }
-
// isEquivalentTo - Return true if the nodes should be merged...
virtual bool isEquivalentTo(DSNode *Node) const;
@@ -356,7 +348,7 @@ protected:
if (ShadowParent)
return new ShadowDSNode(getType(), Mod, ShadowParent);
else
- return new ShadowDSNode(getType(), Mod, CriticalNode);
+ return new ShadowDSNode(getType(), Mod);
}
};