mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Add SrcReg2 to analyzeCompare and optimizeCompareInstr to handle Compare
instructions with two register operands. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159465 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -623,19 +623,22 @@ public:
|
||||
CreateTargetPostRAHazardRecognizer(const InstrItineraryData*,
|
||||
const ScheduleDAG *DAG) const = 0;
|
||||
|
||||
/// AnalyzeCompare - For a comparison instruction, return the source register
|
||||
/// in SrcReg and the value it compares against in CmpValue. Return true if
|
||||
/// the comparison instruction can be analyzed.
|
||||
virtual bool AnalyzeCompare(const MachineInstr *MI,
|
||||
unsigned &SrcReg, int &Mask, int &Value) const {
|
||||
/// analyzeCompare - For a comparison instruction, return the source registers
|
||||
/// in SrcReg and SrcReg2 if having two register operands, and the value it
|
||||
/// compares against in CmpValue. Return true if the comparison instruction
|
||||
/// can be analyzed.
|
||||
virtual bool analyzeCompare(const MachineInstr *MI,
|
||||
unsigned &SrcReg, unsigned &SrcReg2,
|
||||
int &Mask, int &Value) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
/// OptimizeCompareInstr - See if the comparison instruction can be converted
|
||||
/// optimizeCompareInstr - See if the comparison instruction can be converted
|
||||
/// into something more efficient. E.g., on ARM most instructions can set the
|
||||
/// flags register, obviating the need for a separate CMP.
|
||||
virtual bool OptimizeCompareInstr(MachineInstr *CmpInstr,
|
||||
unsigned SrcReg, int Mask, int Value,
|
||||
virtual bool optimizeCompareInstr(MachineInstr *CmpInstr,
|
||||
unsigned SrcReg, unsigned SrcReg2,
|
||||
int Mask, int Value,
|
||||
const MachineRegisterInfo *MRI) const {
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user