mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 10:42:39 +01:00
Fixed to print slightly differently. Added use counts for labels
llvm-svn: 9
This commit is contained in:
parent
0dcec884f6
commit
f2f80282cb
@ -129,15 +129,16 @@ bool AssemblyWriter::processMethodArgument(const MethodArgument *Arg) {
|
|||||||
//
|
//
|
||||||
bool AssemblyWriter::processBasicBlock(const BasicBlock *BB) {
|
bool AssemblyWriter::processBasicBlock(const BasicBlock *BB) {
|
||||||
if (BB->hasName()) { // Print out the label if it exists...
|
if (BB->hasName()) { // Print out the label if it exists...
|
||||||
Out << "\n" << BB->getName() << ":\n";
|
Out << "\n" << BB->getName() << ":";
|
||||||
} else {
|
} else {
|
||||||
int Slot = Table.getValSlot(BB);
|
int Slot = Table.getValSlot(BB);
|
||||||
Out << "\t\t\t\t; <label>:";
|
Out << "\n; <label>:";
|
||||||
if (Slot >= 0)
|
if (Slot >= 0)
|
||||||
Out << Slot << endl; // Extra newline seperates out label's
|
Out << Slot; // Extra newline seperates out label's
|
||||||
else
|
else
|
||||||
Out << "<badref>\n";
|
Out << "<badref>";
|
||||||
}
|
}
|
||||||
|
Out << "\t\t\t\t\t;[#uses=" << BB->use_size() << "]\n"; // Output # uses
|
||||||
|
|
||||||
ModuleAnalyzer::processBasicBlock(BB);
|
ModuleAnalyzer::processBasicBlock(BB);
|
||||||
return false;
|
return false;
|
||||||
@ -227,15 +228,16 @@ bool AssemblyWriter::processInstruction(const Instruction *I) {
|
|||||||
// Print a little comment after the instruction indicating which slot it
|
// Print a little comment after the instruction indicating which slot it
|
||||||
// occupies.
|
// occupies.
|
||||||
//
|
//
|
||||||
if (!I->hasName() && I->getType() != Type::VoidTy) {
|
if (I->getType() != Type::VoidTy) {
|
||||||
int Slot = Table.getValSlot(I); // Print out the def slot taken...
|
Out << "\t\t; <" << I->getType() << ">";
|
||||||
Out << "\t\t; <" << I->getType() << ">:";
|
|
||||||
if (Slot >= 0) Out << Slot;
|
|
||||||
else Out << "<badref>";
|
|
||||||
|
|
||||||
|
if (!I->hasName()) {
|
||||||
|
int Slot = Table.getValSlot(I); // Print out the def slot taken...
|
||||||
|
if (Slot >= 0) Out << ":" << Slot;
|
||||||
|
else Out << ":<badref>";
|
||||||
|
}
|
||||||
Out << "\t[#uses=" << I->use_size() << "]"; // Output # uses
|
Out << "\t[#uses=" << I->use_size() << "]"; // Output # uses
|
||||||
}
|
}
|
||||||
|
|
||||||
Out << endl;
|
Out << endl;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user