summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/PHIElimination.cpp
diff options
context:
space:
mode:
authorQuentin Colombet <qcolombet@apple.com>2016-04-21 21:01:13 +0000
committerQuentin Colombet <qcolombet@apple.com>2016-04-21 21:01:13 +0000
commit23341a84cacfa57722a6d0807846f164317f9d8d (patch)
treea17a3b115192cecd2616b2d9b8495eab6f2beaaa /llvm/lib/CodeGen/PHIElimination.cpp
parent95590f4b7bba50a05807de14aae5eb9678937dc5 (diff)
downloadbcm5719-llvm-23341a84cacfa57722a6d0807846f164317f9d8d.tar.gz
bcm5719-llvm-23341a84cacfa57722a6d0807846f164317f9d8d.zip
[MachineBasicBlock] Make the pass argument truly mandatory when
splitting edges. MachineBasicBlock::SplitCriticalEdges will crash if a nullptr would have been passed for the Pass argument. Do not allow that by turning this argument into a reference. The alternative would have been to make the Pass a truly optional argument, but although this is easy to do, I was afraid users using it like this would not be aware the livness information, dominator tree and such would silently be broken. llvm-svn: 267052
Diffstat (limited to 'llvm/lib/CodeGen/PHIElimination.cpp')
-rw-r--r--llvm/lib/CodeGen/PHIElimination.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/PHIElimination.cpp b/llvm/lib/CodeGen/PHIElimination.cpp
index 4a0c1633308..9cbb318f0c8 100644
--- a/llvm/lib/CodeGen/PHIElimination.cpp
+++ b/llvm/lib/CodeGen/PHIElimination.cpp
@@ -610,7 +610,7 @@ bool PHIElimination::SplitPHIEdges(MachineFunction &MF,
}
if (!ShouldSplit && !SplitAllCriticalEdges)
continue;
- if (!PreMBB->SplitCriticalEdge(&MBB, this)) {
+ if (!PreMBB->SplitCriticalEdge(&MBB, *this)) {
DEBUG(dbgs() << "Failed to split critical edge.\n");
continue;
}
OpenPOWER on IntegriCloud