mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 21:24:00 +00:00
Modify the two address instruction pass to remove the duplicate
operand of the instruction and thus simplify the register allocation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11124 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -27,24 +27,6 @@ namespace llvm {
|
||||
//
|
||||
extern const TargetInstrDescriptor *TargetInstrDescriptors;
|
||||
|
||||
bool MachineOperand::isEverUsed(const MachineInstr& mi) const
|
||||
{
|
||||
for (int i = 0, e = mi.getNumOperands(); i != e; ++i) {
|
||||
if (*this == mi.getOperand(i) && mi.getOperand(i).isUse())
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool MachineOperand::isEverDefined(const MachineInstr& mi) const
|
||||
{
|
||||
for (int i = 0, e = mi.getNumOperands(); i != e; ++i) {
|
||||
if (*this == mi.getOperand(i) && mi.getOperand(i).isDef())
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Constructor for instructions with variable #operands
|
||||
MachineInstr::MachineInstr(MachineOpCode OpCode, unsigned numOperands)
|
||||
: opCode(OpCode),
|
||||
|
Reference in New Issue
Block a user