summaryrefslogtreecommitdiff
path: root/lib/CodeGen/PHIElimination.cpp
diff options
context:
space:
mode:
authorCameron Zwarich <zwarich@apple.com>2013-02-11 09:24:47 +0000
committerCameron Zwarich <zwarich@apple.com>2013-02-11 09:24:47 +0000
commit8597c14e9b32259cc7cfd752d95fd71e7aaba0ec (patch)
tree0e76fd9fa683475707cf1fda5c05a4651399f9f1 /lib/CodeGen/PHIElimination.cpp
parentcbe3f5e1622b5f809bc04d61da125801e4658a73 (diff)
downloadllvm-8597c14e9b32259cc7cfd752d95fd71e7aaba0ec.tar.gz
llvm-8597c14e9b32259cc7cfd752d95fd71e7aaba0ec.tar.bz2
llvm-8597c14e9b32259cc7cfd752d95fd71e7aaba0ec.tar.xz
Add support for updating LiveIntervals to MachineBasicBlock::SplitCriticalEdge().
This is currently a bit hairier than it needs to be, since depending on where the split block resides the end ListEntry of the split block may be the end ListEntry of the original block or a new entry. Some changes to the SlotIndexes updating should make it possible to eliminate the two cases here. This also isn't as optimized as it could be. In the future Liveinterval should probably get a flag that indicates whether the LiveInterval is within a single basic block. We could ignore all such intervals when splitting an edge. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174870 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/PHIElimination.cpp')
-rw-r--r--lib/CodeGen/PHIElimination.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/PHIElimination.cpp b/lib/CodeGen/PHIElimination.cpp
index bf2b95fd29..aa84a60efd 100644
--- a/lib/CodeGen/PHIElimination.cpp
+++ b/lib/CodeGen/PHIElimination.cpp
@@ -129,7 +129,7 @@ bool PHIElimination::runOnMachineFunction(MachineFunction &MF) {
// Split critical edges to help the coalescer. This does not yet support
// updating LiveIntervals, so we disable it.
- if (!DisableEdgeSplitting && LV && !LIS) {
+ if (!DisableEdgeSplitting && (LV || LIS)) {
MachineLoopInfo *MLI = getAnalysisIfAvailable<MachineLoopInfo>();
for (MachineFunction::iterator I = MF.begin(), E = MF.end(); I != E; ++I)
Changed |= SplitPHIEdges(MF, *I, MLI);