diff options
| author | Dan Gohman <gohman@apple.com> | 2008-06-21 20:21:19 +0000 | 
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2008-06-21 20:21:19 +0000 | 
| commit | 55083d5dd3f96c64bae13b998463c813167b0cc5 (patch) | |
| tree | bf9d8d299bab5149bf48d0342455f90bf69118aa /llvm/lib/Target/Sparc | |
| parent | 5a92bab4f0e59be836f307f3a7d3b22f46663e7f (diff) | |
| download | bcm5719-llvm-55083d5dd3f96c64bae13b998463c813167b0cc5.tar.gz bcm5719-llvm-55083d5dd3f96c64bae13b998463c813167b0cc5.zip | |
Use MachineBasicBlock::transferSuccessors.
llvm-svn: 52594
Diffstat (limited to 'llvm/lib/Target/Sparc')
| -rw-r--r-- | llvm/lib/Target/Sparc/SparcISelLowering.cpp | 11 | 
1 files changed, 3 insertions, 8 deletions
| diff --git a/llvm/lib/Target/Sparc/SparcISelLowering.cpp b/llvm/lib/Target/Sparc/SparcISelLowering.cpp index 89172fcb527..5c0617438c4 100644 --- a/llvm/lib/Target/Sparc/SparcISelLowering.cpp +++ b/llvm/lib/Target/Sparc/SparcISelLowering.cpp @@ -920,15 +920,10 @@ SparcTargetLowering::EmitInstrWithCustomInserter(MachineInstr *MI,    MachineFunction *F = BB->getParent();    F->getBasicBlockList().insert(It, copy0MBB);    F->getBasicBlockList().insert(It, sinkMBB); -  // Update machine-CFG edges by first adding all successors of the current +  // Update machine-CFG edges by transferring all successors of the current    // block to the new block which will contain the Phi node for the select. -  for(MachineBasicBlock::succ_iterator i = BB->succ_begin(),  -      e = BB->succ_end(); i != e; ++i) -    sinkMBB->addSuccessor(*i); -  // Next, remove all successors of the current block, and add the true -  // and fallthrough blocks as its successors. -  while(!BB->succ_empty()) -    BB->removeSuccessor(BB->succ_begin()); +  sinkMBB->transferSuccessors(BB); +  // Next, add the true and fallthrough blocks as its successors.    BB->addSuccessor(copy0MBB);    BB->addSuccessor(sinkMBB); | 

