mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
land David Blaikie's patch to de-constify Type, with a few tweaks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135375 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -222,7 +222,7 @@ bool AddressingModeMatcher::MatchOperationAddr(User *AddrInst, unsigned Opcode,
|
||||
const TargetData *TD = TLI.getTargetData();
|
||||
gep_type_iterator GTI = gep_type_begin(AddrInst);
|
||||
for (unsigned i = 1, e = AddrInst->getNumOperands(); i != e; ++i, ++GTI) {
|
||||
if (const StructType *STy = dyn_cast<StructType>(*GTI)) {
|
||||
if (StructType *STy = dyn_cast<StructType>(*GTI)) {
|
||||
const StructLayout *SL = TD->getStructLayout(STy);
|
||||
unsigned Idx =
|
||||
cast<ConstantInt>(AddrInst->getOperand(i))->getZExtValue();
|
||||
@ -557,7 +557,7 @@ IsProfitableToFoldIntoAddressingMode(Instruction *I, ExtAddrMode &AMBefore,
|
||||
Value *Address = User->getOperand(OpNo);
|
||||
if (!Address->getType()->isPointerTy())
|
||||
return false;
|
||||
const Type *AddressAccessTy =
|
||||
Type *AddressAccessTy =
|
||||
cast<PointerType>(Address->getType())->getElementType();
|
||||
|
||||
// Do a match against the root of this address, ignoring profitability. This
|
||||
|
Reference in New Issue
Block a user