diff options
author | Dale Johannesen <dalej@apple.com> | 2008-09-12 17:49:03 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2008-09-12 17:49:03 +0000 |
commit | 1f3ab8680470760c1d7ed5f5d98a90a5c0bdc1cd (patch) | |
tree | 0879437a06dc82183cece164e3994a0d2d5dbd8a /llvm/lib/CodeGen/MachineInstr.cpp | |
parent | effb894453a6d69a6c6becabb4451ec883d1fe2c (diff) | |
download | bcm5719-llvm-1f3ab8680470760c1d7ed5f5d98a90a5c0bdc1cd.tar.gz bcm5719-llvm-1f3ab8680470760c1d7ed5f5d98a90a5c0bdc1cd.zip |
Pass "earlyclobber" bit through to machine
representation; coalescer and RA need to know
about it. No functional change.
llvm-svn: 56161
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineInstr.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp index 9fbae684799..4cdf0642450 100644 --- a/llvm/lib/CodeGen/MachineInstr.cpp +++ b/llvm/lib/CodeGen/MachineInstr.cpp @@ -104,7 +104,8 @@ void MachineOperand::ChangeToImmediate(int64_t ImmVal) { /// the specified value. If an operand is known to be an register already, /// the setReg method should be used. void MachineOperand::ChangeToRegister(unsigned Reg, bool isDef, bool isImp, - bool isKill, bool isDead) { + bool isKill, bool isDead, + bool isEarlyClobber) { // If this operand is already a register operand, use setReg to update the // register's use/def lists. if (isReg()) { @@ -126,6 +127,7 @@ void MachineOperand::ChangeToRegister(unsigned Reg, bool isDef, bool isImp, IsImp = isImp; IsKill = isKill; IsDead = isDead; + IsEarlyClobber = isEarlyClobber; SubReg = 0; } @@ -181,13 +183,15 @@ void MachineOperand::print(std::ostream &OS, const TargetMachine *TM) const { OS << "%mreg" << getReg(); } - if (isDef() || isKill() || isDead() || isImplicit()) { + if (isDef() || isKill() || isDead() || isImplicit() || isEarlyClobber()) { OS << "<"; bool NeedComma = false; if (isImplicit()) { OS << (isDef() ? "imp-def" : "imp-use"); NeedComma = true; } else if (isDef()) { + if (isEarlyClobber()) + OS << "earlyclobber,"; OS << "def"; NeedComma = true; } |