diff options
Diffstat (limited to 'lib/CodeGen/PreAllocSplitting.cpp')
-rw-r--r-- | lib/CodeGen/PreAllocSplitting.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/CodeGen/PreAllocSplitting.cpp b/lib/CodeGen/PreAllocSplitting.cpp index 8f223b3600..4044b7365b 100644 --- a/lib/CodeGen/PreAllocSplitting.cpp +++ b/lib/CodeGen/PreAllocSplitting.cpp @@ -89,6 +89,8 @@ namespace { AU.addPreservedID(StrongPHIEliminationID); else AU.addPreservedID(PHIEliminationID); + AU.addRequired<MachineLoopInfo>(); + AU.addPreserved<MachineLoopInfo>(); MachineFunctionPass::getAnalysisUsage(AU); } @@ -633,6 +635,14 @@ bool PreAllocSplitting::SplitRegLiveInterval(LiveInterval *LI) { assert(0 && "Val# is defined by a dead def?"); abort(); } + + // Pre-splitting a vreg that does not have a PHI kill across a barrier + // that is within a loop can potentially create a join that was not + // present before, which would make updating the live intervals very + // difficult. Bailout instead. + MachineLoopInfo& MLI = getAnalysis<MachineLoopInfo>(); + if (!ValNo->hasPHIKill && MLI.getLoopFor(BarrierMBB)) + return false; // FIXME: For now, if definition is rematerializable, do not split. MachineInstr *DefMI = (ValNo->def != ~0U) |