diff options
author | Chris Lattner <sabre@nondot.org> | 2002-04-16 03:41:22 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-04-16 03:41:22 +0000 |
commit | da022cd143a3694e7f8c2cdad827c4caf90d3b5f (patch) | |
tree | efb2f96aeee0f9108b5a5d9e580677dfaefbd48b /include/llvm/Analysis/DataStructure.h | |
parent | 09b9212b6e581dd4a6007071607069586d7402f5 (diff) |
* Eliminate ArgDSNode's completely, rely now on Scalar map
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2256 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/DataStructure.h')
-rw-r--r-- | include/llvm/Analysis/DataStructure.h | 30 |
1 files changed, 7 insertions, 23 deletions
diff --git a/include/llvm/Analysis/DataStructure.h b/include/llvm/Analysis/DataStructure.h index bf787ea5ab..dd51909a2d 100644 --- a/include/llvm/Analysis/DataStructure.h +++ b/include/llvm/Analysis/DataStructure.h @@ -309,25 +309,6 @@ private: }; -// ArgDSNode - Represent an incoming argument to the current function... -// -class ArgDSNode : public DSNode { - Argument *FuncArg; -public: - ArgDSNode(Argument *FA); - virtual std::string getCaption() const; - - // isEquivalentTo - Return true if the nodes should be merged... - virtual bool isEquivalentTo(DSNode *Node) const; - - // Support type inquiry through isa, cast, and dyn_cast... - static bool classof(const ArgDSNode *) { return true; } - static bool classof(const DSNode *N) { return N->NodeType == ArgNode; } -private: - virtual ArgDSNode *cloneImpl() const { return new ArgDSNode(FuncArg); } -}; - - // ShadowDSNode - Represent a chunk of memory that we need to be able to // address. These are generated due to (for example) pointer type method // arguments... if the pointer is dereferenced, we need to have a node to point @@ -384,7 +365,6 @@ protected: // class FunctionDSGraph { Function *Func; - std::vector<ArgDSNode*> ArgNodes; std::vector<AllocDSNode*> AllocNodes; std::vector<ShadowDSNode*> ShadowNodes; std::vector<GlobalDSNode*> GlobalNodes; @@ -395,9 +375,12 @@ class FunctionDSGraph { // cloneFunctionIntoSelf - Clone the specified method graph into the current // method graph, returning the Return's set of the graph. If ValueMap is set // to true, the ValueMap of the function is cloned into this function as well - // as the data structure graph itself. + // as the data structure graph itself. Regardless, the arguments value sets + // of DSG are copied into Args. // - PointerValSet cloneFunctionIntoSelf(const FunctionDSGraph &G, bool ValueMap); + PointerValSet cloneFunctionIntoSelf(const FunctionDSGraph &G, bool ValueMap, + std::vector<PointerValSet> &Args); + bool RemoveUnreachableNodes(); bool UnlinkUndistinguishableNodes(); void MarkEscapeableNodesReachable(std::vector<bool> &RSN, @@ -429,11 +412,12 @@ public: // function point to... // std::map<Value*, PointerValSet> &getValueMap() { return ValueMap; } + const std::map<Value*, PointerValSet> &getValueMap() const { return ValueMap;} const PointerValSet &getRetNodes() const { return RetNode; } unsigned getGraphSize() const { - return ArgNodes.size() + AllocNodes.size() + ShadowNodes.size() + + return AllocNodes.size() + ShadowNodes.size() + GlobalNodes.size() + CallNodes.size(); } |