summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2010-01-19 22:08:34 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2010-01-19 22:08:34 +0000
commite8800b8d7c6f0604e98653d532341a88f047bb0e (patch)
tree3dcb301b24f8df4f75e6c768111d636bd62c89df /llvm/lib/CodeGen
parentaccb183371d347130ae51d207336aceefbcae2dc (diff)
downloadbcm5719-llvm-e8800b8d7c6f0604e98653d532341a88f047bb0e.tar.gz
bcm5719-llvm-e8800b8d7c6f0604e98653d532341a88f047bb0e.zip
Identify predicate and optional-def operands when printing machine
instructions. llvm-svn: 93925
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/MachineInstr.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp
index d58a0fb01a9..ef2fceef257 100644
--- a/llvm/lib/CodeGen/MachineInstr.cpp
+++ b/llvm/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);
}
OpenPOWER on IntegriCloud