[llvm-commits] [llvm] r123389 - in /llvm/trunk/lib/CodeGen: MachineBasicBlock.cpp PHIElimination.cpp
Devang Patel
dpatel at apple.com
Thu Jan 13 11:27:50 PST 2011
Author: dpatel
Date: Thu Jan 13 13:27:50 2011
New Revision: 123389
URL: http://llvm.org/viewvc/llvm-project?rev=123389&view=rev
Log:
Speculatively revert r123384 to make llvm-gcc-i386-linux-selfhost buildbot happy.
Modified:
llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp
llvm/trunk/lib/CodeGen/PHIElimination.cpp
Modified: llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp?rev=123389&r1=123388&r2=123389&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp Thu Jan 13 13:27:50 2011
@@ -155,22 +155,11 @@
}
MachineBasicBlock::iterator MachineBasicBlock::getFirstTerminator() {
- iterator B = begin(), I = end();
- iterator Term = I;
- while (I != B) {
- --I;
- // Ignore any debug values after the first terminator.
- if (I->isDebugValue())
- continue;
- // Stop once we see a non-debug non-terminator.
- if (!I->getDesc().isTerminator())
- break;
- // Earliest terminator so far.
- Term = I;
- }
- // Return the first terminator, or end().
- // Everything after Term is terminators and debug values.
- return Term;
+ iterator I = end();
+ while (I != begin() && (--I)->getDesc().isTerminator())
+ ; /*noop */
+ if (I != end() && !I->getDesc().isTerminator()) ++I;
+ return I;
}
void MachineBasicBlock::dump() const {
Modified: llvm/trunk/lib/CodeGen/PHIElimination.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PHIElimination.cpp?rev=123389&r1=123388&r2=123389&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/PHIElimination.cpp (original)
+++ llvm/trunk/lib/CodeGen/PHIElimination.cpp Thu Jan 13 13:27:50 2011
@@ -339,8 +339,6 @@
#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!");
More information about the llvm-commits
mailing list