~ubuntu-branches/ubuntu/precise/llvm-2.8/precise

« back to all changes in this revision

Viewing changes to lib/CodeGen/MachineCSE.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2010-09-21 14:03:34 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20100921140334-i4xxl0a768fcqffl
Tags: 2.8~20100921-0ubuntu1
New upstream snapshot, taken from the 2.8 branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
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
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 {