summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/lib/CodeGen/MachineCSE.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2010-10-07 20:31:07 +0000
committerdim <dim@FreeBSD.org>2010-10-07 20:31:07 +0000
commitbd9a22a54ea3eebd6e9ce34ba6f339c76dae2c62 (patch)
tree28998061a324b4c40ce3f58faa8fd1bb4173fc9d /contrib/llvm/lib/CodeGen/MachineCSE.cpp
parent472b886ca9cf75d7d3b2bb9a4902aa73f50cff6b (diff)
downloadFreeBSD-src-bd9a22a54ea3eebd6e9ce34ba6f339c76dae2c62.zip
FreeBSD-src-bd9a22a54ea3eebd6e9ce34ba6f339c76dae2c62.tar.gz
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)
Diffstat (limited to 'contrib/llvm/lib/CodeGen/MachineCSE.cpp')
-rw-r--r--contrib/llvm/lib/CodeGen/MachineCSE.cpp9
1 files changed, 8 insertions, 1 deletions
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<MachineDominatorTree>();
}
+ virtual void releaseMemory() {
+ ScopeMap.clear();
+ Exps.clear();
+ }
+
private:
const unsigned LookAheadLimit;
typedef ScopedHashTableScope<MachineInstr*, unsigned,
@@ -101,7 +106,7 @@ bool MachineCSE::PerformTrivialCoalescing(MachineInstr *MI,
unsigned Reg = MO.getReg();
if (!Reg || TargetRegisterInfo::isPhysicalRegister(Reg))
continue;
- if (!MRI->hasOneUse(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<MachineDomTreeNode*, MachineDomTreeNode*> ParentMap;
DenseMap<MachineDomTreeNode*, unsigned> OpenChildren;
+ CurrVN = 0;
+
// Perform a DFS walk to determine the order of visit.
WorkList.push_back(Node);
do {
OpenPOWER on IntegriCloud