[llvm-commits] CVS: llvm/lib/Target/SparcV9/InstrSelection/InstrSelection.cpp
Brian Gaeke
gaeke at cs.uiuc.edu
Sat May 29 17:23:01 PDT 2004
Changes in directory llvm/lib/Target/SparcV9/InstrSelection:
InstrSelection.cpp updated: 1.73 -> 1.74
---
Log message:
Give InsertCodeForPhis() a new documentation comment.
---
Diffs of the changes: (+7 -9)
Index: llvm/lib/Target/SparcV9/InstrSelection/InstrSelection.cpp
diff -u llvm/lib/Target/SparcV9/InstrSelection/InstrSelection.cpp:1.73 llvm/lib/Target/SparcV9/InstrSelection/InstrSelection.cpp:1.74
--- llvm/lib/Target/SparcV9/InstrSelection/InstrSelection.cpp:1.73 Fri May 28 14:34:00 2004
+++ llvm/lib/Target/SparcV9/InstrSelection/InstrSelection.cpp Sat May 29 17:20:59 2004
@@ -207,15 +207,13 @@
return true;
}
-
-//-------------------------------------------------------------------------
-// This method inserts phi elimination code for all BBs in a method
-//-------------------------------------------------------------------------
-
-void
-InstructionSelection::InsertCodeForPhis(Function &F) {
- // for all basic blocks in function
- //
+/// InsertCodeForPhis - This method inserts Phi elimination code for
+/// all Phi nodes in the given function. After this method is called,
+/// the Phi nodes still exist in the LLVM code, but copies are added to the
+/// machine code.
+///
+void InstructionSelection::InsertCodeForPhis(Function &F) {
+ // Iterate over every Phi node PN in F:
MachineFunction &MF = MachineFunction::get(&F);
for (MachineFunction::iterator BB = MF.begin(); BB != MF.end(); ++BB) {
for (BasicBlock::const_iterator IIt = BB->getBasicBlock()->begin();
More information about the llvm-commits
mailing list