mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-09-08 08:54:58 +00:00
Asmprint nameless instructions as:
%4 = add ... instead of: add ... ; 4 This makes opt -print-cfg output actually usable and makes .ll files generally easier to read. This fixes PR2480 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55541 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
33e4e610b5
commit
828db8a2f9
@ -1486,7 +1486,7 @@ void AssemblyWriter::printInfoComment(const Value &V) {
|
|||||||
printType(V.getType());
|
printType(V.getType());
|
||||||
Out << '>';
|
Out << '>';
|
||||||
|
|
||||||
if (!V.hasName()) {
|
if (!V.hasName() && !isa<Instruction>(V)) {
|
||||||
int SlotNum;
|
int SlotNum;
|
||||||
if (const GlobalValue *GV = dyn_cast<GlobalValue>(&V))
|
if (const GlobalValue *GV = dyn_cast<GlobalValue>(&V))
|
||||||
SlotNum = Machine.getGlobalSlot(GV);
|
SlotNum = Machine.getGlobalSlot(GV);
|
||||||
@ -1511,6 +1511,13 @@ void AssemblyWriter::printInstruction(const Instruction &I) {
|
|||||||
if (I.hasName()) {
|
if (I.hasName()) {
|
||||||
PrintLLVMName(Out, &I);
|
PrintLLVMName(Out, &I);
|
||||||
Out << " = ";
|
Out << " = ";
|
||||||
|
} else if (I.getType() != Type::VoidTy) {
|
||||||
|
// Print out the def slot taken.
|
||||||
|
int SlotNum = Machine.getLocalSlot(&I);
|
||||||
|
if (SlotNum == -1)
|
||||||
|
Out << "<badref> = ";
|
||||||
|
else
|
||||||
|
Out << '%' << SlotNum << " = ";
|
||||||
}
|
}
|
||||||
|
|
||||||
// If this is a volatile load or store, print out the volatile marker.
|
// If this is a volatile load or store, print out the volatile marker.
|
||||||
|
Loading…
Reference in New Issue
Block a user