diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-01-19 22:08:34 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-01-19 22:08:34 +0000 |
commit | b1bb4afbc7d801f9875be135c428b6f05511db5d (patch) | |
tree | 0e13b02be6947bb932c3d5cc53d9143d82f1a149 /lib/CodeGen/MachineInstr.cpp | |
parent | 32ae3fe0ba469240753e2342e36485f7c9acfb5c (diff) |
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
Diffstat (limited to 'lib/CodeGen/MachineInstr.cpp')
-rw-r--r-- | lib/CodeGen/MachineInstr.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp index d58a0fb01a..ef2fceef25 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); } |