diff options
| author | Owen Anderson <resistor@mac.com> | 2008-11-02 08:08:18 +0000 |
|---|---|---|
| committer | Owen Anderson <resistor@mac.com> | 2008-11-02 08:08:18 +0000 |
| commit | 2bb2aaa775e1a88dac9e0729b3a1726ff4c15dfa (patch) | |
| tree | e5cfc6c5706d42985dfc532957225075e2a51163 /llvm/lib/CodeGen | |
| parent | 0433be6feb66346ddf00c1e47674ef53e2e16292 (diff) | |
| download | bcm5719-llvm-2bb2aaa775e1a88dac9e0729b3a1726ff4c15dfa.tar.gz bcm5719-llvm-2bb2aaa775e1a88dac9e0729b3a1726ff4c15dfa.zip | |
Don't do pre-splitting if doing so would create a value join that did not
exist before. Updating the live intervals in that care is tricky in the general
case.
Evan, if you see a tighter guard condition for this, let me know.
llvm-svn: 58560
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/PreAllocSplitting.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/PreAllocSplitting.cpp b/llvm/lib/CodeGen/PreAllocSplitting.cpp index 8f223b36007..4044b7365b7 100644 --- a/llvm/lib/CodeGen/PreAllocSplitting.cpp +++ b/llvm/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) |

