[llvm] r262885 - [MIR] Teach the printer how to print complex types for generic machine instructions.
Quentin Colombet via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 7 16:38:01 PST 2016
Author: qcolombet
Date: Mon Mar 7 18:38:01 2016
New Revision: 262885
URL: http://llvm.org/viewvc/llvm-project?rev=262885&view=rev
Log:
[MIR] Teach the printer how to print complex types for generic machine instructions.
Before this change, we would get the type definition in the middle
of the instruction.
E.g., %0(48) = G_ADD %struct_alias = type { i32, i16 } %edi, %edi
Now, we have just the expected type name:
%0(48) = G_ADD %struct_alias %edi, %edi
Modified:
llvm/trunk/lib/CodeGen/MIRPrinter.cpp
Modified: llvm/trunk/lib/CodeGen/MIRPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MIRPrinter.cpp?rev=262885&r1=262884&r2=262885&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MIRPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/MIRPrinter.cpp Mon Mar 7 18:38:01 2016
@@ -554,7 +554,8 @@ void MIPrinter::print(const MachineInstr
OS << TII->getName(MI.getOpcode());
if (isPreISelGenericOpcode(MI.getOpcode())) {
assert(MI.getType() && "Generic instructions must have a type");
- OS << ' ' << *MI.getType();
+ OS << ' ';
+ MI.getType()->print(OS, /*IsForDebug*/ false, /*NoDetails*/ true);
}
if (I < E)
OS << ' ';
More information about the llvm-commits
mailing list