mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-06 04:18:00 +00:00
Make this code less confusing. Instead of reassigning BB, just operate
on the original variables, so it's easier to see what is being done to which blocks. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102759 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -8556,21 +8556,17 @@ X86TargetLowering::EmitLoweredSelect(MachineInstr *MI,
|
|||||||
// copy0MBB:
|
// copy0MBB:
|
||||||
// %FalseValue = ...
|
// %FalseValue = ...
|
||||||
// # fallthrough to sinkMBB
|
// # fallthrough to sinkMBB
|
||||||
BB = copy0MBB;
|
copy0MBB->addSuccessor(sinkMBB);
|
||||||
|
|
||||||
// Update machine-CFG edges
|
|
||||||
BB->addSuccessor(sinkMBB);
|
|
||||||
|
|
||||||
// sinkMBB:
|
// sinkMBB:
|
||||||
// %Result = phi [ %FalseValue, copy0MBB ], [ %TrueValue, thisMBB ]
|
// %Result = phi [ %FalseValue, copy0MBB ], [ %TrueValue, thisMBB ]
|
||||||
// ...
|
// ...
|
||||||
BB = sinkMBB;
|
BuildMI(sinkMBB, DL, TII->get(X86::PHI), MI->getOperand(0).getReg())
|
||||||
BuildMI(BB, DL, TII->get(X86::PHI), MI->getOperand(0).getReg())
|
|
||||||
.addReg(MI->getOperand(1).getReg()).addMBB(copy0MBB)
|
.addReg(MI->getOperand(1).getReg()).addMBB(copy0MBB)
|
||||||
.addReg(MI->getOperand(2).getReg()).addMBB(thisMBB);
|
.addReg(MI->getOperand(2).getReg()).addMBB(thisMBB);
|
||||||
|
|
||||||
F->DeleteMachineInstr(MI); // The pseudo instruction is gone now.
|
F->DeleteMachineInstr(MI); // The pseudo instruction is gone now.
|
||||||
return BB;
|
return sinkMBB;
|
||||||
}
|
}
|
||||||
|
|
||||||
MachineBasicBlock *
|
MachineBasicBlock *
|
||||||
|
|||||||
Reference in New Issue
Block a user