diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2011-02-26 22:03:50 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2011-02-26 22:03:50 +0000 | 
| commit | d0e4e96dc17a6c1c6de3340842c80f0e187ba349 (patch) | |
| tree | ddf53b8bd9235bcb0b8aae16c5e22310dcdad665 /lib/CodeGen/MachineFunction.cpp | |
| parent | cf099d11218cb6f6c5cce947d6738e347f07fb12 (diff) | |
Notes
Diffstat (limited to 'lib/CodeGen/MachineFunction.cpp')
| -rw-r--r-- | lib/CodeGen/MachineFunction.cpp | 12 | 
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/CodeGen/MachineFunction.cpp b/lib/CodeGen/MachineFunction.cpp index 85532407ca43..d81e4a1d015f 100644 --- a/lib/CodeGen/MachineFunction.cpp +++ b/lib/CodeGen/MachineFunction.cpp @@ -396,8 +396,7 @@ void MachineFunction::viewCFGOnly() const  /// addLiveIn - Add the specified physical register as a live-in value and  /// create a corresponding virtual register for it.  unsigned MachineFunction::addLiveIn(unsigned PReg, -                                    const TargetRegisterClass *RC, -                                    DebugLoc DL) { +                                    const TargetRegisterClass *RC) {    MachineRegisterInfo &MRI = getRegInfo();    unsigned VReg = MRI.getLiveInVirtReg(PReg);    if (VReg) { @@ -406,7 +405,6 @@ unsigned MachineFunction::addLiveIn(unsigned PReg,    }    VReg = MRI.createVirtualRegister(RC);    MRI.addLiveIn(PReg, VReg); -  MRI.addLiveInLoc(VReg, DL);    return VReg;  } @@ -646,6 +644,10 @@ MachineConstantPool::~MachineConstantPool() {    for (unsigned i = 0, e = Constants.size(); i != e; ++i)      if (Constants[i].isMachineConstantPoolEntry())        delete Constants[i].Val.MachineCPVal; +  for (DenseSet<MachineConstantPoolValue*>::iterator I = +       MachineCPVsSharingEntries.begin(), E = MachineCPVsSharingEntries.end(); +       I != E; ++I) +    delete *I;  }  /// CanShareConstantPoolEntry - Test whether the given two constants @@ -723,8 +725,10 @@ unsigned MachineConstantPool::getConstantPoolIndex(MachineConstantPoolValue *V,    //    // FIXME, this could be made much more efficient for large constant pools.    int Idx = V->getExistingMachineCPValue(this, Alignment); -  if (Idx != -1) +  if (Idx != -1) { +    MachineCPVsSharingEntries.insert(V);      return (unsigned)Idx; +  }    Constants.push_back(MachineConstantPoolEntry(V, Alignment));    return Constants.size()-1;  | 
