mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-16 12:24:03 +00:00
Minor cleanups and simplifications
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10127 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -186,7 +186,7 @@ void LowerSwitch::processSwitchInst(SwitchInst *SI) {
|
||||
|
||||
// If there is only the default destination, don't bother with the code below.
|
||||
if (SI->getNumOperands() == 2) {
|
||||
new BranchInst(SI->getDefaultDest(), 0, 0, CurBlock);
|
||||
new BranchInst(SI->getDefaultDest(), CurBlock);
|
||||
delete SI;
|
||||
return;
|
||||
}
|
||||
@ -196,7 +196,7 @@ void LowerSwitch::processSwitchInst(SwitchInst *SI) {
|
||||
BasicBlock* NewDefault = new BasicBlock("NewDefault");
|
||||
F->getBasicBlockList().insert(Default, NewDefault);
|
||||
|
||||
new BranchInst(Default, 0, 0, NewDefault);
|
||||
new BranchInst(Default, NewDefault);
|
||||
|
||||
// If there is an entry in any PHI nodes for the default edge, make sure
|
||||
// to update them as well.
|
||||
@ -219,7 +219,7 @@ void LowerSwitch::processSwitchInst(SwitchInst *SI) {
|
||||
OrigBlock, NewDefault);
|
||||
|
||||
// Branch to our shiny new if-then stuff...
|
||||
new BranchInst(SwitchBlock, 0, 0, OrigBlock);
|
||||
new BranchInst(SwitchBlock, OrigBlock);
|
||||
|
||||
// We are now done with the switch instruction, delete it.
|
||||
delete SI;
|
||||
|
Reference in New Issue
Block a user