Home | History | Annotate | Download | only in Scalar

Lines Matching refs:Offset

227   /// UnfoldedOffset - An additional constant offset which added near the
228 /// use. This requires a temporary register, but the offset itself can
839 int64_t Offset = (uint64_t)*I + F.AM.BaseOffs;
843 else if (Offset != 0)
844 ImmCost += APInt(64, Offset, true).getMinSignedBits();
914 /// this fixup needs, minus an offset (below).
917 /// Offset - A constant offset to be added to the LSRUse expression.
920 int64_t Offset;
933 Offset(0) {}
973 if (Offset != 0)
974 OS << ", Offset=" << Offset;
1895 /// at the given offset and other details. If so, update the use and
1936 /// getUse - Return an LSRUse index and an offset value for a fixup which
1943 int64_t Offset = ExtractImmediate(Expr, SE);
1945 // Basic uses can't accept any offset, for example.
1946 if (!isAlwaysFoldable(Offset, 0, /*HasBaseReg=*/true, Kind, AccessTy, TLI)) {
1948 Offset = 0;
1957 if (reconcileNewOffset(LU, Offset, /*HasBaseReg=*/true, Kind, AccessTy))
1959 return std::make_pair(LUIdx, Offset);
1970 if (LU.Offsets.empty() || Offset != LU.Offsets.back())
1971 LU.Offsets.push_back(Offset);
1973 LU.MinOffset = Offset;
1974 LU.MaxOffset = Offset;
1975 return std::make_pair(LUIdx, Offset);
2151 LF.Offset = P.second;
2284 LF.Offset = P.second;
2453 // We can't add a symbolic offset if the address already contains one.
2474 // TODO: For now, just add the min and max offset, because it usually isn't
2490 // Add the offset to the base register.
2527 // Don't do this if there is more than one offset.
2544 // Check that multiplying with the use offset doesn't overflow.
2545 int64_t Offset = LU.MinOffset;
2546 if (Offset == INT64_MIN && Factor == -1)
2548 Offset = (uint64_t)Offset * Factor;
2549 if (Offset / Factor != LU.MinOffset)
2556 if (!isLegalUse(F.AM, Offset, Offset, LU.Kind, LU.AccessTy, TLI))
2560 F.AM.BaseOffs = (uint64_t)F.AM.BaseOffs + Offset - LU.MinOffset;
2578 // Check that multiplying with the unfolded offset doesn't overflow.
2594 /// scaled-offset address modes, for example.
2703 << " , add offset " << Imm;
2713 // Group the registers by their value without any added constant offset.
2741 // It's not worthwhile looking for reuse if there's only one offset.
2751 // Examine each offset.
2779 // Make a memo of this use, offset, and register tuple.
3088 "separated by a constant offset will use the same "
3114 Fixup.Offset += F.AM.BaseOffs;
3115 // Add the new offset to LUThatHas' offset list.
3116 if (LUThatHas->Offsets.back() != Fixup.Offset) {
3117 LUThatHas->Offsets.push_back(Fixup.Offset);
3118 if (Fixup.Offset > LUThatHas->MaxOffset)
3119 LUThatHas->MaxOffset = Fixup.Offset;
3120 if (Fixup.Offset < LUThatHas->MinOffset)
3121 LUThatHas->MinOffset = Fixup.Offset;
3123 DEBUG(dbgs() << "New fixup has offset "
3124 << Fixup.Offset << '\n');
3590 int64_t Offset = (uint64_t)F.AM.BaseOffs + LF.Offset;
3591 if (Offset != 0) {
3596 ICmpScaledV = ConstantInt::get(IntTy, -(uint64_t)Offset);
3599 ICmpScaledV = ConstantInt::get(IntTy, Offset);
3604 Ops.push_back(SE.getUnknown(ConstantInt::getSigned(IntTy, Offset)));
3608 // Expand the unfolded offset portion.
3647 -(uint64_t)Offset);