mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-29 10:25:12 +00:00
Tail duplication still needs to iterate. Duplicating new instructions onto
the tail of a block may make that block a new candidate for duplication. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89264 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -197,7 +197,6 @@ bool BranchFolder::OptimizeFunction(MachineFunction &MF,
|
||||
MadeChange |= OptimizeImpDefsBlock(MBB);
|
||||
}
|
||||
|
||||
|
||||
bool MadeChangeThisIteration = true;
|
||||
while (MadeChangeThisIteration) {
|
||||
MadeChangeThisIteration = false;
|
||||
@@ -206,10 +205,15 @@ bool BranchFolder::OptimizeFunction(MachineFunction &MF,
|
||||
MadeChange |= MadeChangeThisIteration;
|
||||
}
|
||||
|
||||
// Do tail duplication once after tail merging is done. Otherwise it is
|
||||
// Do tail duplication after tail merging is done. Otherwise it is
|
||||
// tough to avoid situations where tail duplication and tail merging undo
|
||||
// each other's transformations ad infinitum.
|
||||
MadeChange |= TailDuplicateBlocks(MF);
|
||||
MadeChangeThisIteration = true;
|
||||
while (MadeChangeThisIteration) {
|
||||
MadeChangeThisIteration = false;
|
||||
MadeChangeThisIteration |= TailDuplicateBlocks(MF);
|
||||
MadeChange |= MadeChangeThisIteration;
|
||||
}
|
||||
|
||||
// See if any jump tables have become mergable or dead as the code generator
|
||||
// did its thing.
|
||||
|
Reference in New Issue
Block a user