mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +00:00
Add option to commuteInstruction() which forces it to create a new (commuted) instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52308 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -155,7 +155,10 @@ public:
|
||||
/// return a new machine instruction. If an instruction cannot commute, it
|
||||
/// can also return null.
|
||||
///
|
||||
virtual MachineInstr *commuteInstruction(MachineInstr *MI) const = 0;
|
||||
/// If NewMI is true, then a new machine instruction must be created.
|
||||
///
|
||||
virtual MachineInstr *commuteInstruction(MachineInstr *MI,
|
||||
bool NewMI = false) const = 0;
|
||||
|
||||
/// CommuteChangesDestination - Return true if commuting the specified
|
||||
/// instruction will also changes the destination operand. Also return the
|
||||
@@ -411,7 +414,8 @@ protected:
|
||||
TargetInstrInfoImpl(const TargetInstrDesc *desc, unsigned NumOpcodes)
|
||||
: TargetInstrInfo(desc, NumOpcodes) {}
|
||||
public:
|
||||
virtual MachineInstr *commuteInstruction(MachineInstr *MI) const;
|
||||
virtual MachineInstr *commuteInstruction(MachineInstr *MI,
|
||||
bool NewMI = false) const;
|
||||
virtual bool CommuteChangesDestination(MachineInstr *MI,
|
||||
unsigned &OpIdx) const;
|
||||
virtual bool PredicateInstruction(MachineInstr *MI,
|
||||
|
||||
Reference in New Issue
Block a user