mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
Move the search for the appropriate AND instruction
into OptimizeCompareInstr. This necessitates the passing of CmpValue around, so widen the virtual functions to accomodate. No functionality changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114428 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -581,7 +581,7 @@ public:
|
||||
/// 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 &CmpValue) const {
|
||||
unsigned &SrcReg, int &Mask, int &Value) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -589,8 +589,8 @@ public:
|
||||
/// into something more efficient. E.g., on ARM most instructions can set the
|
||||
/// flags register, obviating the need for a separate CMP. Update the iterator
|
||||
/// *only* if a transformation took place.
|
||||
virtual bool OptimizeCompareInstr(MachineInstr * /*CmpInstr*/,
|
||||
unsigned /*SrcReg*/, int /*CmpValue*/,
|
||||
virtual bool OptimizeCompareInstr(MachineInstr *CmpInstr,
|
||||
unsigned SrcReg, int Mask, int Value,
|
||||
MachineBasicBlock::iterator &) const {
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user