From bd9a22a54ea3eebd6e9ce34ba6f339c76dae2c62 Mon Sep 17 00:00:00 2001 From: dim Date: Thu, 7 Oct 2010 20:31:07 +0000 Subject: Upgrade Clang and LLVM to the 2.8 release. See here for release notes: http://llvm.org/releases/2.8/docs/ReleaseNotes.html Approved by: rpaulo (mentor) --- contrib/llvm/lib/CodeGen/MachineCSE.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'contrib/llvm/lib/CodeGen/MachineCSE.cpp') diff --git a/contrib/llvm/lib/CodeGen/MachineCSE.cpp b/contrib/llvm/lib/CodeGen/MachineCSE.cpp index 92e2299..272b54d 100644 --- a/contrib/llvm/lib/CodeGen/MachineCSE.cpp +++ b/contrib/llvm/lib/CodeGen/MachineCSE.cpp @@ -54,6 +54,11 @@ namespace { AU.addPreserved(); } + virtual void releaseMemory() { + ScopeMap.clear(); + Exps.clear(); + } + private: const unsigned LookAheadLimit; typedef ScopedHashTableScopehasOneUse(Reg)) + if (!MRI->hasOneNonDBGUse(Reg)) // Only coalesce single use copies. This ensure the copy will be // deleted. continue; @@ -469,6 +474,8 @@ bool MachineCSE::PerformCSE(MachineDomTreeNode *Node) { DenseMap ParentMap; DenseMap OpenChildren; + CurrVN = 0; + // Perform a DFS walk to determine the order of visit. WorkList.push_back(Node); do { -- cgit v1.1