[llvm-commits] CVS: llvm/lib/CodeGen/MachineFunction.cpp
Chris Lattner
lattner at cs.uiuc.edu
Mon Oct 28 00:03:02 PST 2002
Changes in directory llvm/lib/CodeGen:
MachineFunction.cpp updated: 1.24 -> 1.25
---
Log message:
Eliminate unneccesary use of MachineBasicBlock::get
---
Diffs of the changes:
Index: llvm/lib/CodeGen/MachineFunction.cpp
diff -u llvm/lib/CodeGen/MachineFunction.cpp:1.24 llvm/lib/CodeGen/MachineFunction.cpp:1.25
--- llvm/lib/CodeGen/MachineFunction.cpp:1.24 Sun Oct 27 23:58:46 2002
+++ llvm/lib/CodeGen/MachineFunction.cpp Mon Oct 28 00:01:57 2002
@@ -312,13 +312,11 @@
std::cerr << "\n" << Fn->getReturnType()
<< " \"" << Fn->getName() << "\"\n";
- for (Function::const_iterator BB = Fn->begin(); BB != Fn->end(); ++BB)
- {
- std::cerr << "\n" << BB->getName() << " (" << (const void*)BB
- << ")" << ":" << "\n";
- MachineBasicBlock& mvec = MachineBasicBlock::get(BB);
- for (unsigned i=0; i < mvec.size(); i++)
- std::cerr << "\t" << *mvec[i];
- }
+ for (const_iterator BB = begin(); BB != end(); ++BB) {
+ std::cerr << "\n" << BB->getBasicBlock()->getName() << " ("
+ << (const void*)BB->getBasicBlock() << ")" << ":" << "\n";
+ for (MachineBasicBlock::const_iterator I = BB->begin(); I != BB->end(); ++I)
+ std::cerr << "\t" << *I;
+ }
std::cerr << "\nEnd function \"" << Fn->getName() << "\"\n\n";
}
More information about the llvm-commits
mailing list