diff options
| author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-09-01 17:25:18 +0000 | 
|---|---|---|
| committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-09-01 17:25:18 +0000 | 
| commit | e417273fceb76b266a7d384dba345e3d0c85a898 (patch) | |
| tree | a175d2d29eca6c81713c76f8c8c5239e20e02783 /llvm | |
| parent | 6357fa2f0684781d711d92826f39aeadfccec7f6 (diff) | |
| download | bcm5719-llvm-e417273fceb76b266a7d384dba345e3d0c85a898.tar.gz bcm5719-llvm-e417273fceb76b266a7d384dba345e3d0c85a898.zip | |
Revert r138794, "Do not try to rematerialize a value from a partial definition."
The problem is fixed for all register allocators by r138944, so this
patch is no longer necessary.
<rdar://problem/10032939>
llvm-svn: 138945
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/lib/CodeGen/InlineSpiller.cpp | 23 | 
1 files changed, 1 insertions, 22 deletions
| diff --git a/llvm/lib/CodeGen/InlineSpiller.cpp b/llvm/lib/CodeGen/InlineSpiller.cpp index 5992a3a6e35..f0f69872b03 100644 --- a/llvm/lib/CodeGen/InlineSpiller.cpp +++ b/llvm/lib/CodeGen/InlineSpiller.cpp @@ -189,20 +189,6 @@ static unsigned isFullCopyOf(const MachineInstr *MI, unsigned Reg) {    return 0;  } -/// isFullDefOf - Return true if MI defines the full contents of a register. -/// Since this is in the context of spilling, it does not do anything special -/// for physical registers. -static bool isFullDefOf(const MachineInstr *MI, unsigned Reg) { -  for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { -    const MachineOperand &MO = MI->getOperand(i); -    if (!MO.isReg() || !MO.isDef() || MO.getSubReg()) -      continue; -    if (MO.getReg() == Reg) -      return true; -  } -  return false; -} -  /// isSnippet - Identify if a live interval is a snippet that should be spilled.  /// It is assumed that SnipLI is a virtual register with the same original as  /// Edit->getReg(). @@ -320,7 +306,6 @@ MachineInstr *InlineSpiller::traceSiblingValue(unsigned UseReg, VNInfo *UseVNI,    MachineBasicBlock *SpillMBB = UseMBB;    unsigned SpillDepth = Loops.getLoopDepth(SpillMBB);    bool SeenOrigPHI = false; // Original PHI met. -  bool SeenNonReloadDef = false;    do {      unsigned Reg; @@ -422,18 +407,12 @@ MachineInstr *InlineSpiller::traceSiblingValue(unsigned UseReg, VNInfo *UseVNI,      }      // Potential remat candidate. -    SeenNonReloadDef = true; -    if (!isFullDefOf(MI, Reg)) { -      DEBUG(dbgs() << "  partial def " << PrintReg(Reg) << ':' -                   << VNI->id << '@' << VNI->def << '\t' << *MI); -      continue; -    }      DEBUG(dbgs() << "  def " << PrintReg(Reg) << ':'                   << VNI->id << '@' << VNI->def << '\t' << *MI);      SVI.DefMI = MI;    } while (!WorkList.empty()); -  if (SeenOrigPHI || SeenNonReloadDef) +  if (SeenOrigPHI || SVI.DefMI)      SVI.AllDefsAreReloads = false;    DEBUG({ | 

