mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-02 08:26:39 +00:00
SLSR: Pass address space to isLegalAddressingMode
This only updates one of the uses. The other is used in cases that may never touch memory, so I'm not sure why this is even calling it. Perhaps there should be a new, similar hook for such cases or pass -1 for unknown address space. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239540 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -265,8 +265,10 @@ static bool isGEPFoldable(GetElementPtrInst *GEP,
|
||||
BaseOffset += DL->getStructLayout(STy)->getElementOffset(Field);
|
||||
}
|
||||
}
|
||||
|
||||
unsigned AddrSpace = GEP->getPointerAddressSpace();
|
||||
return TTI->isLegalAddressingMode(GEP->getType()->getElementType(), BaseGV,
|
||||
BaseOffset, HasBaseReg, Scale);
|
||||
BaseOffset, HasBaseReg, Scale, AddrSpace);
|
||||
}
|
||||
|
||||
// Returns whether (Base + Index * Stride) can be folded to an addressing mode.
|
||||
|
Reference in New Issue
Block a user