From: Jakob Stoklund Olesen Date: Tue, 19 Jan 2010 22:08:34 +0000 (+0000) Subject: Identify predicate and optional-def operands when printing machine X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=b1bb4afbc7d801f9875be135c428b6f05511db5d;p=oota-llvm.git Identify predicate and optional-def operands when printing machine instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93925 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp index d58a0fb01a9..ef2fceef257 100644 --- a/lib/CodeGen/MachineInstr.cpp +++ b/lib/CodeGen/MachineInstr.cpp @@ -1162,6 +1162,13 @@ void MachineInstr::print(raw_ostream &OS, const TargetMachine *TM) const { 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); }