mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-29 10:25:12 +00:00
Add isLegalAddressingMode address space argument to TTI
Update to match the TLI version, and remove the TLI version's default argument. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239260 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -207,7 +207,8 @@ public:
|
||||
bool isLegalICmpImmediate(int64_t Imm) { return false; }
|
||||
|
||||
bool isLegalAddressingMode(Type *Ty, GlobalValue *BaseGV, int64_t BaseOffset,
|
||||
bool HasBaseReg, int64_t Scale) {
|
||||
bool HasBaseReg, int64_t Scale,
|
||||
unsigned AddrSpace) {
|
||||
// Guess that only reg and reg+reg addressing is allowed. This heuristic is
|
||||
// taken from the implementation of LSR.
|
||||
return !BaseGV && BaseOffset == 0 && (Scale == 0 || Scale == 1);
|
||||
@@ -218,9 +219,10 @@ public:
|
||||
bool isLegalMaskedLoad(Type *DataType, int Consecutive) { return false; }
|
||||
|
||||
int getScalingFactorCost(Type *Ty, GlobalValue *BaseGV, int64_t BaseOffset,
|
||||
bool HasBaseReg, int64_t Scale) {
|
||||
bool HasBaseReg, int64_t Scale, unsigned AddrSpace) {
|
||||
// Guess that all legal addressing mode are free.
|
||||
if (isLegalAddressingMode(Ty, BaseGV, BaseOffset, HasBaseReg, Scale))
|
||||
if (isLegalAddressingMode(Ty, BaseGV, BaseOffset, HasBaseReg,
|
||||
Scale, AddrSpace))
|
||||
return 0;
|
||||
return -1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user