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
This commit is contained in:
Jakob Stoklund Olesen 2010-01-19 22:08:34 +00:00
parent 32ae3fe0ba
commit b1bb4afbc7

View File

@ -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);
}