mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
Add methods to add implicit def use operands to a MI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31675 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -125,6 +125,18 @@ bool MachineOperand::isIdenticalTo(const MachineOperand &Other) const {
|
||||
}
|
||||
}
|
||||
|
||||
/// addImplicitDefUseOperands - Add all implicit def and use operands to
|
||||
/// this instruction.
|
||||
void MachineInstr::addImplicitDefUseOperands() {
|
||||
const TargetInstrDescriptor &TID = TargetInstrDescriptors[Opcode];
|
||||
if (TID.ImplicitDefs)
|
||||
for (const unsigned *ImpDefs = TID.ImplicitDefs; *ImpDefs; ++ImpDefs)
|
||||
addRegOperand(*ImpDefs, true, true);
|
||||
if (TID.ImplicitUses)
|
||||
for (const unsigned *ImpUses = TID.ImplicitUses; *ImpUses; ++ImpUses)
|
||||
addRegOperand(*ImpUses, false, true);
|
||||
}
|
||||
|
||||
|
||||
void MachineInstr::dump() const {
|
||||
std::cerr << " " << *this;
|
||||
|
Reference in New Issue
Block a user