Identify predicate and optional-def operands when printing machine

instructions.

llvm-svn: 93925
This commit is contained in:
Jakob Stoklund Olesen 2010-01-19 22:08:34 +00:00
parent accb183371
commit e8800b8d7c
1 changed files with 7 additions and 0 deletions

View File

@ -1162,6 +1162,13 @@ void MachineInstr::print(raw_ostream &OS, const TargetMachine *TM) const {
if (FirstOp) FirstOp = false; else OS << ","; if (FirstOp) FirstOp = false; else OS << ",";
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); MO.print(OS, TM);
} }