diff options
author | Chris Lattner <sabre@nondot.org> | 2002-04-27 02:27:11 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-04-27 02:27:11 +0000 |
commit | 12be9749d60c647a804fa6f057d7c1cf20fd3714 (patch) | |
tree | 15a9bc9e4c68aa13931b33f674d12bc99ee7c265 /include/llvm/Analysis/DataStructure/DataStructure.h | |
parent | c72114ca728dcffb9fb92cc63c9fd71b9be58645 (diff) |
Support array allocations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2326 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/DataStructure/DataStructure.h')
-rw-r--r-- | include/llvm/Analysis/DataStructure/DataStructure.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/include/llvm/Analysis/DataStructure/DataStructure.h b/include/llvm/Analysis/DataStructure/DataStructure.h index 0474da11d1..2d21545aeb 100644 --- a/include/llvm/Analysis/DataStructure/DataStructure.h +++ b/include/llvm/Analysis/DataStructure/DataStructure.h @@ -180,6 +180,7 @@ public: // isEquivalentTo - Return true if the nodes should be merged... virtual bool isEquivalentTo(DSNode *Node) const = 0; + virtual void mergeInto(DSNode *Node) const {} DSNode *clone() const { DSNode *New = cloneImpl(); @@ -210,8 +211,9 @@ protected: // class AllocDSNode : public DSNode { AllocationInst *Allocation; + bool isVarSize; // Allocating variable sized objects public: - AllocDSNode(AllocationInst *V); + AllocDSNode(AllocationInst *V, bool isVarSize = false); virtual std::string getCaption() const; @@ -219,15 +221,18 @@ public: bool isMallocNode() const { return !isAllocaNode(); } AllocationInst *getAllocation() const { return Allocation; } + bool isVariableSize() const { return isVarSize; } // isEquivalentTo - Return true if the nodes should be merged... virtual bool isEquivalentTo(DSNode *Node) const; + virtual void mergeInto(DSNode *Node) const; // Support type inquiry through isa, cast, and dyn_cast... static bool classof(const AllocDSNode *) { return true; } static bool classof(const DSNode *N) { return N->NodeType == NewNode; } protected: - virtual AllocDSNode *cloneImpl() const { return new AllocDSNode(Allocation); } + virtual AllocDSNode *cloneImpl() const { return new AllocDSNode(Allocation, + isVarSize); } }; |