diff options
author | Tim Northover <tnorthover@apple.com> | 2016-08-05 17:50:36 +0000 |
---|---|---|
committer | Tim Northover <tnorthover@apple.com> | 2016-08-05 17:50:36 +0000 |
commit | 14e7f73a0f87fd67c0f93a282d2e55af147edeee (patch) | |
tree | 39bc3fb5c176e9864be35308f74c14467ad22cbf /llvm/lib | |
parent | 9d168222249a89dab2a48069137157eb8c3f1d06 (diff) | |
download | bcm5719-llvm-14e7f73a0f87fd67c0f93a282d2e55af147edeee.tar.gz bcm5719-llvm-14e7f73a0f87fd67c0f93a282d2e55af147edeee.zip |
GlobalISel: clear pending phis after MachineFunction translated
Test is just reordering the existing functions (it would trigger for any
function after one with a phi).
llvm-svn: 277841
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp b/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp index 2982731bb2e..618a3859e22 100644 --- a/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp +++ b/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp @@ -249,6 +249,8 @@ void IRTranslator::finishPendingPhis() { MIB.addMBB(BBToMBB[PI->getIncomingBlock(i)]); } } + + PendingPHIs.clear(); } bool IRTranslator::translate(const Instruction &Inst) { @@ -327,6 +329,8 @@ bool IRTranslator::runOnMachineFunction(MachineFunction &MF) { MRI = &MF.getRegInfo(); DL = &F.getParent()->getDataLayout(); + assert(PendingPHIs.empty() && "stale PHIs"); + // Setup the arguments. MachineBasicBlock &MBB = getOrCreateBB(F.front()); MIRBuilder.setMBB(MBB); |