File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,11 @@ namespace {
54
54
AU.addPreserved <MachineDominatorTree>();
55
55
}
56
56
57
+ virtual void releaseMemory () {
58
+ ScopeMap.clear ();
59
+ Exps.clear ();
60
+ }
61
+
57
62
private:
58
63
const unsigned LookAheadLimit;
59
64
typedef ScopedHashTableScope<MachineInstr*, unsigned ,
@@ -101,7 +106,7 @@ bool MachineCSE::PerformTrivialCoalescing(MachineInstr *MI,
101
106
unsigned Reg = MO.getReg ();
102
107
if (!Reg || TargetRegisterInfo::isPhysicalRegister (Reg))
103
108
continue ;
104
- if (!MRI->hasOneUse (Reg))
109
+ if (!MRI->hasOneNonDBGUse (Reg))
105
110
// Only coalesce single use copies. This ensure the copy will be
106
111
// deleted.
107
112
continue ;
@@ -469,6 +474,8 @@ bool MachineCSE::PerformCSE(MachineDomTreeNode *Node) {
469
474
DenseMap<MachineDomTreeNode*, MachineDomTreeNode*> ParentMap;
470
475
DenseMap<MachineDomTreeNode*, unsigned > OpenChildren;
471
476
477
+ CurrVN = 0 ;
478
+
472
479
// Perform a DFS walk to determine the order of visit.
473
480
WorkList.push_back (Node);
474
481
do {
You can’t perform that action at this time.
0 commit comments