mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-05-20 20:38:48 +00:00
Reduce indentation and fix the count of how many PHIs we have inserted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134370 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
736a0118b5
commit
c0af352038
@ -201,7 +201,9 @@ bool TailDuplicatePass::TailDuplicateBlocks(MachineFunction &MF) {
|
||||
|
||||
SmallVector<MachineBasicBlock*, 8> TDBBs;
|
||||
SmallVector<MachineInstr*, 16> Copies;
|
||||
if (TailDuplicate(MBB, MF, TDBBs, Copies)) {
|
||||
if (!TailDuplicate(MBB, MF, TDBBs, Copies))
|
||||
continue;
|
||||
|
||||
++NumTails;
|
||||
|
||||
// TailBB's immediate successors are now successors of those predecessors
|
||||
@ -220,6 +222,7 @@ bool TailDuplicatePass::TailDuplicateBlocks(MachineFunction &MF) {
|
||||
|
||||
// Update SSA form.
|
||||
if (!SSAUpdateVRs.empty()) {
|
||||
NewPHIs.clear();
|
||||
for (unsigned i = 0, e = SSAUpdateVRs.size(); i != e; ++i) {
|
||||
unsigned VReg = SSAUpdateVRs[i];
|
||||
SSAUpdate.Initialize(VReg);
|
||||
@ -285,9 +288,11 @@ bool TailDuplicatePass::TailDuplicateBlocks(MachineFunction &MF) {
|
||||
if (PreRegAlloc && TailDupVerify)
|
||||
VerifyPHIs(MF, false);
|
||||
MadeChange = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (NewPHIs.size())
|
||||
NumAddedPHIs += NewPHIs.size();
|
||||
}
|
||||
|
||||
|
||||
return MadeChange;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user