mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-15 23:31:37 +00:00
Reenable the optimization added in 133415, but change the definition of a "simple" bb to
be one with only one unconditional branch and no phis. Duplicating the phis in this case is possible, but requeres liveness analysis or breaking edges. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133607 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6332fdef15
commit
c9be257261
@ -568,9 +568,9 @@ bool
|
||||
TailDuplicatePass::isSimpleBB(MachineBasicBlock *TailBB) {
|
||||
if (TailBB->succ_size() != 1)
|
||||
return false;
|
||||
MachineBasicBlock::iterator I = TailBB->getFirstNonPHI();
|
||||
MachineBasicBlock::iterator I = TailBB->begin();
|
||||
MachineBasicBlock::iterator E = TailBB->end();
|
||||
while (I->isDebugValue() && I != E)
|
||||
while (I != E && I->isDebugValue())
|
||||
++I;
|
||||
if (I == E)
|
||||
return true;
|
||||
@ -712,7 +712,7 @@ TailDuplicatePass::TailDuplicate(MachineBasicBlock *TailBB, MachineFunction &MF,
|
||||
DenseSet<unsigned> UsedByPhi;
|
||||
getRegsUsedByPHIs(*TailBB, &UsedByPhi);
|
||||
|
||||
if (0 && isSimpleBB(TailBB))
|
||||
if (isSimpleBB(TailBB))
|
||||
return duplicateSimpleBB(TailBB, TDBBs, UsedByPhi, Copies);
|
||||
|
||||
// Iterate through all the unique predecessors and tail-duplicate this
|
||||
|
Loading…
x
Reference in New Issue
Block a user