random cleanups.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79794 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2009-08-23 00:35:30 +00:00
parent 5aba5c0e88
commit 6371ed5e2b

View File

@@ -99,8 +99,8 @@ void ilist_traits<MachineInstr>::removeNodeFromList(MachineInstr* N) {
/// transferNodesFromList (MI) - When moving a range of instructions from one
/// MBB list to another, we need to update the parent pointers and the use/def
/// lists.
void ilist_traits<MachineInstr>::transferNodesFromList(
ilist_traits<MachineInstr>& fromList,
void ilist_traits<MachineInstr>::
transferNodesFromList(ilist_traits<MachineInstr> &fromList,
MachineBasicBlock::iterator first,
MachineBasicBlock::iterator last) {
assert(Parent->getParent() == fromList.Parent->getParent() &&
@@ -189,7 +189,7 @@ void MachineBasicBlock::print(raw_ostream &OS,
}
const BasicBlock *LBB = getBasicBlock();
OS << "\n";
OS << '\n';
if (LBB) OS << LBB->getName() << ": ";
OS << (const void*)this
<< ", LLVM BB @" << (const void*) LBB << ", ID#" << getNumber();
@@ -202,18 +202,18 @@ void MachineBasicBlock::print(raw_ostream &OS,
OS << "Live Ins:";
for (const_livein_iterator I = livein_begin(),E = livein_end(); I != E; ++I)
OutputReg(OS, *I, TRI);
OS << "\n";
OS << '\n';
}
// Print the preds of this block according to the CFG.
if (!pred_empty()) {
OS << " Predecessors according to CFG:";
for (const_pred_iterator PI = pred_begin(), E = pred_end(); PI != E; ++PI)
OS << " " << *PI << " (#" << (*PI)->getNumber() << ")";
OS << "\n";
OS << ' ' << *PI << " (#" << (*PI)->getNumber() << ')';
OS << '\n';
}
for (const_iterator I = begin(); I != end(); ++I) {
prefix(OS, *I) << "\t";
prefix(OS, *I) << '\t';
I->print(OS, &getParent()->getTarget());
}
@@ -221,8 +221,8 @@ void MachineBasicBlock::print(raw_ostream &OS,
if (!succ_empty()) {
OS << " Successors according to CFG:";
for (const_succ_iterator SI = succ_begin(), E = succ_end(); SI != E; ++SI)
OS << " " << *SI << " (#" << (*SI)->getNumber() << ")";
OS << "\n";
OS << ' ' << *SI << " (#" << (*SI)->getNumber() << ')';
OS << '\n';
}
}
@@ -277,15 +277,14 @@ void MachineBasicBlock::removePredecessor(MachineBasicBlock *pred) {
Predecessors.erase(I);
}
void MachineBasicBlock::transferSuccessors(MachineBasicBlock *fromMBB)
{
void MachineBasicBlock::transferSuccessors(MachineBasicBlock *fromMBB) {
if (this == fromMBB)
return;
for(MachineBasicBlock::succ_iterator iter = fromMBB->succ_begin(),
end = fromMBB->succ_end(); iter != end; ++iter) {
addSuccessor(*iter);
}
for (MachineBasicBlock::succ_iterator I = fromMBB->succ_begin(),
E = fromMBB->succ_end(); I != E; ++I)
addSuccessor(*I);
while (!fromMBB->succ_empty())
fromMBB->removeSuccessor(fromMBB->succ_begin());
}