summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineInstr.cpp
diff options
context:
space:
mode:
authorRuchira Sasanka <sasanka@students.uiuc.edu>2001-09-15 19:07:45 +0000
committerRuchira Sasanka <sasanka@students.uiuc.edu>2001-09-15 19:07:45 +0000
commitbae3812a951e77031c9346bd2ad8341472aa5e07 (patch)
tree99e9db617bdf0c4d13febc936fa96892934c7ac3 /llvm/lib/CodeGen/MachineInstr.cpp
parent6fd9532e547ea9a848f6e0400a1ed4f9a9b99d58 (diff)
downloadbcm5719-llvm-bae3812a951e77031c9346bd2ad8341472aa5e07.tar.gz
bcm5719-llvm-bae3812a951e77031c9346bd2ad8341472aa5e07.zip
added setRegForValue to MachineOperand class
llvm-svn: 591
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineInstr.cpp27
1 files changed, 26 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp
index e5b768eca99..bbe2144f237 100644
--- a/llvm/lib/CodeGen/MachineInstr.cpp
+++ b/llvm/lib/CodeGen/MachineInstr.cpp
@@ -345,7 +345,31 @@ ChooseRegOrImmed(Value* val,
void
-PrintMachineInstructions(const Method* method)
+PrintMachineInstructions(const Method *const method)
+{
+ cout << "\n" << method->getReturnType()
+ << " \"" << method->getName() << "\"" << endl;
+
+ for (Method::const_iterator BI = method->begin(); BI != method->end(); ++BI)
+ {
+ BasicBlock* bb = *BI;
+ cout << "\n"
+ << (bb->hasName()? bb->getName() : "Label")
+ << " (" << bb << ")" << ":"
+ << endl;
+
+ MachineCodeForBasicBlock& mvec = bb->getMachineInstrVec();
+ for (unsigned i=0; i < mvec.size(); i++)
+ cout << "\t" << *mvec[i] << endl;
+ }
+ cout << endl << "End method \"" << method->getName() << "\""
+ << endl << endl;
+}
+
+#if 0
+
+void PrintMachineInstructions(Method * method)
+
{
cout << "\n" << method->getReturnType()
<< " \"" << method->getName() << "\"" << endl;
@@ -365,3 +389,4 @@ PrintMachineInstructions(const Method* method)
cout << endl << "End method \"" << method->getName() << "\""
<< endl << endl;
}
+#endif
OpenPOWER on IntegriCloud