From c2b768f09e108b71348af58f3ab31d0fc6d15dd6 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Fri, 17 Sep 2010 21:59:42 +0000 Subject: [PATCH] Machine CSE was forgetting to clear some data structures. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114222 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/MachineCSE.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/CodeGen/MachineCSE.cpp b/lib/CodeGen/MachineCSE.cpp index 39a50d2078f..272b54dea1f 100644 --- a/lib/CodeGen/MachineCSE.cpp +++ b/lib/CodeGen/MachineCSE.cpp @@ -54,6 +54,11 @@ namespace { AU.addPreserved(); } + virtual void releaseMemory() { + ScopeMap.clear(); + Exps.clear(); + } + private: const unsigned LookAheadLimit; typedef ScopedHashTableScope ParentMap; DenseMap OpenChildren; + CurrVN = 0; + // Perform a DFS walk to determine the order of visit. WorkList.push_back(Node); do {