[llvm-commits] [llvm] r93925 - /llvm/trunk/lib/CodeGen/MachineInstr.cpp
Jakob Stoklund Olesen
stoklund at 2pi.dk
Tue Jan 19 14:08:34 PST 2010
Author: stoklund
Date: Tue Jan 19 16:08:34 2010
New Revision: 93925
URL: http://llvm.org/viewvc/llvm-project?rev=93925&view=rev
Log:
Identify predicate and optional-def operands when printing machine
instructions.
Modified:
llvm/trunk/lib/CodeGen/MachineInstr.cpp
Modified: llvm/trunk/lib/CodeGen/MachineInstr.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineInstr.cpp?rev=93925&r1=93924&r2=93925&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineInstr.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineInstr.cpp Tue Jan 19 16:08:34 2010
@@ -1162,6 +1162,13 @@
if (FirstOp) FirstOp = false; else OS << ",";
OS << " ";
+ if (i < getDesc().NumOperands) {
+ const TargetOperandInfo &TOI = getDesc().OpInfo[i];
+ if (TOI.isPredicate())
+ OS << "pred:";
+ if (TOI.isOptionalDef())
+ OS << "opt:";
+ }
MO.print(OS, TM);
}
More information about the llvm-commits
mailing list