diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-01-13 18:41:05 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-01-13 18:41:05 +0000 |
commit | 0e233ae1831850085af79f08dba47b77769b124c (patch) | |
tree | 5b9c07d6a295ef5ee45b301ef5e09ff7a3abdcf7 /llvm/lib/CodeGen/PHIElimination.cpp | |
parent | c8056a952e2bbe1d7a1d3d9092405e04f124b714 (diff) | |
download | llvm-0e233ae1831850085af79f08dba47b77769b124c.zip llvm-0e233ae1831850085af79f08dba47b77769b124c.tar.gz llvm-0e233ae1831850085af79f08dba47b77769b124c.tar.bz2 |
Teach MachineBasicBlock::getFirstTerminator to ignore debug values.
It will still return an iterator that points to the first terminator or end(),
but there may be DBG_VALUE instructions following the first terminator.
llvm-svn: 123384
Diffstat (limited to 'llvm/lib/CodeGen/PHIElimination.cpp')
-rw-r--r-- | llvm/lib/CodeGen/PHIElimination.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/PHIElimination.cpp b/llvm/lib/CodeGen/PHIElimination.cpp index 923fa21..81ae3618 100644 --- a/llvm/lib/CodeGen/PHIElimination.cpp +++ b/llvm/lib/CodeGen/PHIElimination.cpp @@ -339,6 +339,8 @@ void PHIElimination::LowerAtomicPHINode( #ifndef NDEBUG for (MachineBasicBlock::iterator TI = llvm::next(Term); TI != opBlock.end(); ++TI) { + if (TI->isDebugValue()) + continue; assert(!TI->readsRegister(SrcReg) && "Terminator instructions cannot use virtual registers unless" "they are the first terminator in a block!"); |