added setRegForValue to MachineOperand class

llvm-svn: 591
This commit is contained in:
Ruchira Sasanka 2001-09-15 19:07:45 +00:00
parent 6fd9532e54
commit bae3812a95
1 changed files with 26 additions and 1 deletions

View File

@ -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