[llvm-commits] [llvm] r133646 - /llvm/trunk/lib/CodeGen/TailDuplication.cpp
Chad Rosier
mcrosier at apple.com
Wed Jun 22 14:13:23 PDT 2011
Author: mcrosier
Date: Wed Jun 22 16:13:23 2011
New Revision: 133646
URL: http://llvm.org/viewvc/llvm-project?rev=133646&view=rev
Log:
Revert r133607. This is causing failures in the Clang gccTestSuite.
Specifically, gcc.c-torture/compile/pr21356.c.
Modified:
llvm/trunk/lib/CodeGen/TailDuplication.cpp
Modified: llvm/trunk/lib/CodeGen/TailDuplication.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TailDuplication.cpp?rev=133646&r1=133645&r2=133646&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/TailDuplication.cpp (original)
+++ llvm/trunk/lib/CodeGen/TailDuplication.cpp Wed Jun 22 16:13:23 2011
@@ -568,9 +568,9 @@
TailDuplicatePass::isSimpleBB(MachineBasicBlock *TailBB) {
if (TailBB->succ_size() != 1)
return false;
- MachineBasicBlock::iterator I = TailBB->begin();
+ MachineBasicBlock::iterator I = TailBB->getFirstNonPHI();
MachineBasicBlock::iterator E = TailBB->end();
- while (I != E && I->isDebugValue())
+ while (I->isDebugValue() && I != E)
++I;
if (I == E)
return true;
@@ -712,7 +712,7 @@
DenseSet<unsigned> UsedByPhi;
getRegsUsedByPHIs(*TailBB, &UsedByPhi);
- if (isSimpleBB(TailBB))
+ if (0 && isSimpleBB(TailBB))
return duplicateSimpleBB(TailBB, TDBBs, UsedByPhi, Copies);
// Iterate through all the unique predecessors and tail-duplicate this
More information about the llvm-commits
mailing list