diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-12-07 00:22:07 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-12-07 00:22:07 +0000 |
commit | b0d91abec0076ed99f0cd74403dace369e55b8b4 (patch) | |
tree | 7031c888d9038b09f49e431119433fc72ff4dba1 /llvm/lib/CodeGen | |
parent | 0e58cba286e66e5a55ff30ff1e99ad5a03af297b (diff) | |
download | bcm5719-llvm-b0d91abec0076ed99f0cd74403dace369e55b8b4.tar.gz bcm5719-llvm-b0d91abec0076ed99f0cd74403dace369e55b8b4.zip |
Add MachineOperand IsInternalRead flag.
This flag is used when bundling machine instructions. It indicates
whether the operand reads a value defined inside or outside its bundle.
llvm-svn: 145997
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/MachineInstr.cpp | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp index abe6645909b..f76e8372b01 100644 --- a/llvm/lib/CodeGen/MachineInstr.cpp +++ b/llvm/lib/CodeGen/MachineInstr.cpp @@ -178,6 +178,7 @@ void MachineOperand::ChangeToRegister(unsigned Reg, bool isDef, bool isImp, IsKill = isKill; IsDead = isDead; IsUndef = isUndef; + IsInternalRead = false; IsEarlyClobber = false; IsDebug = isDebug; SubReg = 0; @@ -256,14 +257,26 @@ void MachineOperand::print(raw_ostream &OS, const TargetMachine *TM) const { NeedComma = true; } - if (isKill() || isDead() || isUndef()) { + if (isKill() || isDead() || isUndef() || isInternalRead()) { if (NeedComma) OS << ','; - if (isKill()) OS << "kill"; - if (isDead()) OS << "dead"; + NeedComma = false; + if (isKill()) { + OS << "kill"; + NeedComma = true; + } + if (isDead()) { + OS << "dead"; + NeedComma = true; + } if (isUndef()) { - if (isKill() || isDead()) - OS << ','; + if (NeedComma) OS << ','; OS << "undef"; + NeedComma = true; + } + if (isInternalRead()) { + if (NeedComma) OS << ','; + OS << "internal"; + NeedComma = true; } } OS << '>'; |