Lines Matching refs:AddrMode

2025 struct ExtAddrMode : public TargetLowering::AddrMode {
2539 ExtAddrMode &AddrMode; member in __anonebd7bfba0211::AddressingModeMatcher
2562 MemoryInst(MI), AddrMode(AM), InsertedInsts(InsertedInsts), in AddressingModeMatcher()
2619 if (AddrMode.Scale != 0 && AddrMode.ScaledReg != ScaleReg) in matchScaledValue()
2622 ExtAddrMode TestAddrMode = AddrMode; in matchScaledValue()
2634 AddrMode = TestAddrMode; in matchScaledValue()
2649 AddrMode = TestAddrMode; in matchScaledValue()
3129 ExtAddrMode BackupAddrMode = AddrMode; in matchOperationAddr()
3143 AddrMode = BackupAddrMode; in matchOperationAddr()
3153 AddrMode = BackupAddrMode; in matchOperationAddr()
3206 AddrMode.BaseOffs += ConstantOffset; in matchOperationAddr()
3208 TLI.isLegalAddressingMode(DL, AddrMode, AccessTy, AddrSpace)) { in matchOperationAddr()
3213 AddrMode.BaseOffs -= ConstantOffset; in matchOperationAddr()
3218 ExtAddrMode BackupAddrMode = AddrMode; in matchOperationAddr()
3222 AddrMode.BaseOffs += ConstantOffset; in matchOperationAddr()
3227 if (AddrMode.HasBaseReg) { in matchOperationAddr()
3228 AddrMode = BackupAddrMode; in matchOperationAddr()
3232 AddrMode.HasBaseReg = true; in matchOperationAddr()
3233 AddrMode.BaseReg = AddrInst->getOperand(0); in matchOperationAddr()
3241 AddrMode = BackupAddrMode; in matchOperationAddr()
3243 if (AddrMode.HasBaseReg) in matchOperationAddr()
3245 AddrMode.HasBaseReg = true; in matchOperationAddr()
3246 AddrMode.BaseReg = AddrInst->getOperand(0); in matchOperationAddr()
3247 AddrMode.BaseOffs += ConstantOffset; in matchOperationAddr()
3251 AddrMode = BackupAddrMode; in matchOperationAddr()
3295 ExtAddrMode BackupAddrMode = AddrMode; in matchOperationAddr()
3306 AddrMode = BackupAddrMode; in matchOperationAddr()
3330 AddrMode.BaseOffs += CI->getSExtValue(); in matchAddr()
3331 if (TLI.isLegalAddressingMode(DL, AddrMode, AccessTy, AddrSpace)) in matchAddr()
3333 AddrMode.BaseOffs -= CI->getSExtValue(); in matchAddr()
3336 if (!AddrMode.BaseGV) { in matchAddr()
3337 AddrMode.BaseGV = GV; in matchAddr()
3338 if (TLI.isLegalAddressingMode(DL, AddrMode, AccessTy, AddrSpace)) in matchAddr()
3340 AddrMode.BaseGV = nullptr; in matchAddr()
3343 ExtAddrMode BackupAddrMode = AddrMode; in matchAddr()
3357 isProfitableToFoldIntoAddressingMode(I, BackupAddrMode, AddrMode)) { in matchAddr()
3364 AddrMode = BackupAddrMode; in matchAddr()
3378 if (!AddrMode.HasBaseReg) { in matchAddr()
3379 AddrMode.HasBaseReg = true; in matchAddr()
3380 AddrMode.BaseReg = Addr; in matchAddr()
3382 if (TLI.isLegalAddressingMode(DL, AddrMode, AccessTy, AddrSpace)) in matchAddr()
3384 AddrMode.HasBaseReg = false; in matchAddr()
3385 AddrMode.BaseReg = nullptr; in matchAddr()
3389 if (AddrMode.Scale == 0) { in matchAddr()
3390 AddrMode.Scale = 1; in matchAddr()
3391 AddrMode.ScaledReg = Addr; in matchAddr()
3392 if (TLI.isLegalAddressingMode(DL, AddrMode, AccessTy, AddrSpace)) in matchAddr()
3394 AddrMode.Scale = 0; in matchAddr()
3395 AddrMode.ScaledReg = nullptr; in matchAddr()
3643 ExtAddrMode AddrMode; in optimizeMemoryInst() local
3676 AddrMode = NewAddrMode; in optimizeMemoryInst()
3679 } else if (NewAddrMode == AddrMode) { in optimizeMemoryInst()
3723 DEBUG(dbgs() << "CGP: Found local addrmode: " << AddrMode << "\n"); in optimizeMemoryInst()
3738 DEBUG(dbgs() << "CGP: Reusing nonlocal addrmode: " << AddrMode << " for " in optimizeMemoryInst()
3748 DEBUG(dbgs() << "CGP: SINKING nonlocal addrmode: " << AddrMode << " for " in optimizeMemoryInst()
3754 if (AddrMode.BaseReg && AddrMode.BaseReg->getType()->isPointerTy()) { in optimizeMemoryInst()
3755 ResultPtr = AddrMode.BaseReg; in optimizeMemoryInst()
3756 AddrMode.BaseReg = nullptr; in optimizeMemoryInst()
3759 if (AddrMode.Scale && AddrMode.ScaledReg->getType()->isPointerTy()) { in optimizeMemoryInst()
3762 if (ResultPtr || AddrMode.Scale != 1) in optimizeMemoryInst()
3765 ResultPtr = AddrMode.ScaledReg; in optimizeMemoryInst()
3766 AddrMode.Scale = 0; in optimizeMemoryInst()
3769 if (AddrMode.BaseGV) { in optimizeMemoryInst()
3773 ResultPtr = AddrMode.BaseGV; in optimizeMemoryInst()
3779 if (!ResultPtr && AddrMode.BaseReg) { in optimizeMemoryInst()
3781 Builder.CreateIntToPtr(AddrMode.BaseReg, Addr->getType(), "sunkaddr"); in optimizeMemoryInst()
3782 AddrMode.BaseReg = nullptr; in optimizeMemoryInst()
3783 } else if (!ResultPtr && AddrMode.Scale == 1) { in optimizeMemoryInst()
3785 Builder.CreateIntToPtr(AddrMode.ScaledReg, Addr->getType(), "sunkaddr"); in optimizeMemoryInst()
3786 AddrMode.Scale = 0; in optimizeMemoryInst()
3790 !AddrMode.BaseReg && !AddrMode.Scale && !AddrMode.BaseOffs) { in optimizeMemoryInst()
3804 if (AddrMode.BaseReg) { in optimizeMemoryInst()
3805 Value *V = AddrMode.BaseReg; in optimizeMemoryInst()
3813 if (AddrMode.Scale) { in optimizeMemoryInst()
3814 Value *V = AddrMode.ScaledReg; in optimizeMemoryInst()
3827 if (I && (ResultIndex != AddrMode.BaseReg)) in optimizeMemoryInst()
3832 if (AddrMode.Scale != 1) in optimizeMemoryInst()
3833 V = Builder.CreateMul(V, ConstantInt::get(IntPtrTy, AddrMode.Scale), in optimizeMemoryInst()
3842 if (AddrMode.BaseOffs) { in optimizeMemoryInst()
3843 Value *V = ConstantInt::get(IntPtrTy, AddrMode.BaseOffs); in optimizeMemoryInst()
3867 DEBUG(dbgs() << "CGP: SINKING nonlocal addrmode: " << AddrMode << " for " in optimizeMemoryInst()
3877 if (AddrMode.BaseReg) { in optimizeMemoryInst()
3878 Value *V = AddrMode.BaseReg; in optimizeMemoryInst()
3887 if (AddrMode.Scale) { in optimizeMemoryInst()
3888 Value *V = AddrMode.ScaledReg; in optimizeMemoryInst()
3903 if (I && (Result != AddrMode.BaseReg)) in optimizeMemoryInst()
3907 if (AddrMode.Scale != 1) in optimizeMemoryInst()
3908 V = Builder.CreateMul(V, ConstantInt::get(IntPtrTy, AddrMode.Scale), in optimizeMemoryInst()
3917 if (AddrMode.BaseGV) { in optimizeMemoryInst()
3918 Value *V = Builder.CreatePtrToInt(AddrMode.BaseGV, IntPtrTy, "sunkaddr"); in optimizeMemoryInst()
3926 if (AddrMode.BaseOffs) { in optimizeMemoryInst()
3927 Value *V = ConstantInt::get(IntPtrTy, AddrMode.BaseOffs); in optimizeMemoryInst()