Deleted Added
sdiff udiff text old ( 195098 ) new ( 195340 )
full compact
1//===-- lib/CodeGen/MachineInstr.cpp --------------------------------------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//

--- 106 unchanged lines hidden (view full) ---

115 OpKind = MO_Immediate;
116 Contents.ImmVal = ImmVal;
117}
118
119/// ChangeToRegister - Replace this operand with a new register operand of
120/// the specified value. If an operand is known to be an register already,
121/// the setReg method should be used.
122void MachineOperand::ChangeToRegister(unsigned Reg, bool isDef, bool isImp,
123 bool isKill, bool isDead) {
124 // If this operand is already a register operand, use setReg to update the
125 // register's use/def lists.
126 if (isReg()) {
127 assert(!isEarlyClobber());
128 setReg(Reg);
129 } else {
130 // Otherwise, change this to a register and set the reg#.
131 OpKind = MO_Register;

--- 6 unchanged lines hidden (view full) ---

138 if (MachineFunction *MF = MBB->getParent())
139 AddRegOperandToRegInfo(&MF->getRegInfo());
140 }
141
142 IsDef = isDef;
143 IsImp = isImp;
144 IsKill = isKill;
145 IsDead = isDead;
146 IsEarlyClobber = false;
147 SubReg = 0;
148}
149
150/// isIdenticalTo - Return true if this operand is identical to the specified
151/// operand.
152bool MachineOperand::isIdenticalTo(const MachineOperand &Other) const {
153 if (getType() != Other.getType() ||

--- 47 unchanged lines hidden (view full) ---

201 TM = &MF->getTarget();
202
203 if (TM)
204 OS << "%" << TM->getRegisterInfo()->get(getReg()).Name;
205 else
206 OS << "%mreg" << getReg();
207 }
208
209 if (getSubReg() != 0) {
210 OS << ':' << getSubReg();
211 }
212
213 if (isDef() || isKill() || isDead() || isImplicit() || isEarlyClobber()) {
214 OS << '<';
215 bool NeedComma = false;
216 if (isImplicit()) {
217 if (NeedComma) OS << ',';
218 OS << (isDef() ? "imp-def" : "imp-use");
219 NeedComma = true;
220 } else if (isDef()) {
221 if (NeedComma) OS << ',';
222 if (isEarlyClobber())
223 OS << "earlyclobber,";
224 OS << "def";
225 NeedComma = true;
226 }
227 if (isKill() || isDead()) {
228 if (NeedComma) OS << ',';
229 if (isKill()) OS << "kill";
230 if (isDead()) OS << "dead";
231 }
232 OS << '>';
233 }
234 break;
235 case MachineOperand::MO_Immediate:
236 OS << getImm();
237 break;
238 case MachineOperand::MO_FPImmediate:

--- 882 unchanged lines hidden ---