Lines Matching refs:AddrMode
826 struct ExtAddrMode : public TargetLowering::AddrMode {
896 ExtAddrMode &AddrMode; member in __anon3005b4ff0311::AddressingModeMatcher
906 : AddrModeInsts(AMI), TLI(T), AccessTy(AT), MemoryInst(MI), AddrMode(AM) { in AddressingModeMatcher()
952 if (AddrMode.Scale != 0 && AddrMode.ScaledReg != ScaleReg) in MatchScaledValue()
955 ExtAddrMode TestAddrMode = AddrMode; in MatchScaledValue()
967 AddrMode = TestAddrMode; in MatchScaledValue()
982 AddrMode = TestAddrMode; in MatchScaledValue()
1052 ExtAddrMode BackupAddrMode = AddrMode; in MatchOperationAddr()
1059 AddrMode = BackupAddrMode; in MatchOperationAddr()
1068 AddrMode = BackupAddrMode; in MatchOperationAddr()
1120 AddrMode.BaseOffs += ConstantOffset; in MatchOperationAddr()
1121 if (ConstantOffset == 0 || TLI.isLegalAddressingMode(AddrMode, AccessTy)){ in MatchOperationAddr()
1126 AddrMode.BaseOffs -= ConstantOffset; in MatchOperationAddr()
1131 ExtAddrMode BackupAddrMode = AddrMode; in MatchOperationAddr()
1135 AddrMode.BaseOffs += ConstantOffset; in MatchOperationAddr()
1140 if (AddrMode.HasBaseReg) { in MatchOperationAddr()
1141 AddrMode = BackupAddrMode; in MatchOperationAddr()
1145 AddrMode.HasBaseReg = true; in MatchOperationAddr()
1146 AddrMode.BaseReg = AddrInst->getOperand(0); in MatchOperationAddr()
1154 AddrMode = BackupAddrMode; in MatchOperationAddr()
1156 if (AddrMode.HasBaseReg) in MatchOperationAddr()
1158 AddrMode.HasBaseReg = true; in MatchOperationAddr()
1159 AddrMode.BaseReg = AddrInst->getOperand(0); in MatchOperationAddr()
1160 AddrMode.BaseOffs += ConstantOffset; in MatchOperationAddr()
1164 AddrMode = BackupAddrMode; in MatchOperationAddr()
1184 AddrMode.BaseOffs += CI->getSExtValue(); in MatchAddr()
1185 if (TLI.isLegalAddressingMode(AddrMode, AccessTy)) in MatchAddr()
1187 AddrMode.BaseOffs -= CI->getSExtValue(); in MatchAddr()
1190 if (AddrMode.BaseGV == 0) { in MatchAddr()
1191 AddrMode.BaseGV = GV; in MatchAddr()
1192 if (TLI.isLegalAddressingMode(AddrMode, AccessTy)) in MatchAddr()
1194 AddrMode.BaseGV = 0; in MatchAddr()
1197 ExtAddrMode BackupAddrMode = AddrMode; in MatchAddr()
1206 IsProfitableToFoldIntoAddressingMode(I, BackupAddrMode, AddrMode)) { in MatchAddr()
1213 AddrMode = BackupAddrMode; in MatchAddr()
1225 if (!AddrMode.HasBaseReg) { in MatchAddr()
1226 AddrMode.HasBaseReg = true; in MatchAddr()
1227 AddrMode.BaseReg = Addr; in MatchAddr()
1229 if (TLI.isLegalAddressingMode(AddrMode, AccessTy)) in MatchAddr()
1231 AddrMode.HasBaseReg = false; in MatchAddr()
1232 AddrMode.BaseReg = 0; in MatchAddr()
1236 if (AddrMode.Scale == 0) { in MatchAddr()
1237 AddrMode.Scale = 1; in MatchAddr()
1238 AddrMode.ScaledReg = Addr; in MatchAddr()
1239 if (TLI.isLegalAddressingMode(AddrMode, AccessTy)) in MatchAddr()
1241 AddrMode.Scale = 0; in MatchAddr()
1242 AddrMode.ScaledReg = 0; in MatchAddr()
1479 ExtAddrMode AddrMode; in OptimizeMemoryInst() local
1509 AddrMode = NewAddrMode; in OptimizeMemoryInst()
1512 } else if (NewAddrMode == AddrMode) { in OptimizeMemoryInst()
1552 DEBUG(dbgs() << "CGP: Found local addrmode: " << AddrMode << "\n"); in OptimizeMemoryInst()
1567 DEBUG(dbgs() << "CGP: Reusing nonlocal addrmode: " << AddrMode << " for " in OptimizeMemoryInst()
1572 DEBUG(dbgs() << "CGP: SINKING nonlocal addrmode: " << AddrMode << " for " in OptimizeMemoryInst()
1584 if (AddrMode.BaseReg) { in OptimizeMemoryInst()
1585 Value *V = AddrMode.BaseReg; in OptimizeMemoryInst()
1594 if (AddrMode.Scale) { in OptimizeMemoryInst()
1595 Value *V = AddrMode.ScaledReg; in OptimizeMemoryInst()
1606 if (AddrMode.Scale != 1) in OptimizeMemoryInst()
1607 V = Builder.CreateMul(V, ConstantInt::get(IntPtrTy, AddrMode.Scale), in OptimizeMemoryInst()
1616 if (AddrMode.BaseGV) { in OptimizeMemoryInst()
1617 Value *V = Builder.CreatePtrToInt(AddrMode.BaseGV, IntPtrTy, "sunkaddr"); in OptimizeMemoryInst()
1625 if (AddrMode.BaseOffs) { in OptimizeMemoryInst()
1626 Value *V = ConstantInt::get(IntPtrTy, AddrMode.BaseOffs); in OptimizeMemoryInst()