Lines Matching refs:LoadTy
18 bool canCoerceMustAliasedValueToLoad(Value *StoredVal, Type *LoadTy, in canCoerceMustAliasedValueToLoad() argument
22 if (StoredTy == LoadTy) in canCoerceMustAliasedValueToLoad()
27 if (isFirstClassAggregateOrScalableType(LoadTy) || in canCoerceMustAliasedValueToLoad()
38 if (StoreSize < DL.getTypeSizeInBits(LoadTy).getFixedSize()) in canCoerceMustAliasedValueToLoad()
42 bool LoadNI = DL.isNonIntegralPointerType(LoadTy->getScalarType()); in canCoerceMustAliasedValueToLoad()
53 LoadTy->getPointerAddressSpace()) { in canCoerceMustAliasedValueToLoad()
61 if (StoredNI && StoreSize != DL.getTypeSizeInBits(LoadTy).getFixedSize()) in canCoerceMustAliasedValueToLoad()
170 static int analyzeLoadFromClobberingWrite(Type *LoadTy, Value *LoadPtr, in analyzeLoadFromClobberingWrite() argument
176 if (isFirstClassAggregateOrScalableType(LoadTy)) in analyzeLoadFromClobberingWrite()
186 uint64_t LoadSize = DL.getTypeSizeInBits(LoadTy).getFixedSize(); in analyzeLoadFromClobberingWrite()
208 int analyzeLoadFromClobberingStore(Type *LoadTy, Value *LoadPtr, in analyzeLoadFromClobberingStore() argument
216 if (!canCoerceMustAliasedValueToLoad(StoredVal, LoadTy, DL)) in analyzeLoadFromClobberingStore()
222 return analyzeLoadFromClobberingWrite(LoadTy, LoadPtr, StorePtr, StoreSize, in analyzeLoadFromClobberingStore()
314 int analyzeLoadFromClobberingLoad(Type *LoadTy, Value *LoadPtr, LoadInst *DepLI, in analyzeLoadFromClobberingLoad() argument
320 if (!canCoerceMustAliasedValueToLoad(DepLI, LoadTy, DL)) in analyzeLoadFromClobberingLoad()
325 int R = analyzeLoadFromClobberingWrite(LoadTy, LoadPtr, DepPtr, DepSize, DL); in analyzeLoadFromClobberingLoad()
334 unsigned LoadSize = DL.getTypeStoreSize(LoadTy).getFixedSize(); in analyzeLoadFromClobberingLoad()
346 return analyzeLoadFromClobberingWrite(LoadTy, LoadPtr, DepPtr, Size * 8, DL); in analyzeLoadFromClobberingLoad()
349 int analyzeLoadFromClobberingMemInst(Type *LoadTy, Value *LoadPtr, in analyzeLoadFromClobberingMemInst() argument
360 if (DL.isNonIntegralPointerType(LoadTy->getScalarType())) { in analyzeLoadFromClobberingMemInst()
365 return analyzeLoadFromClobberingWrite(LoadTy, LoadPtr, MI->getDest(), in analyzeLoadFromClobberingMemInst()
383 int Offset = analyzeLoadFromClobberingWrite(LoadTy, LoadPtr, MI->getDest(), in analyzeLoadFromClobberingMemInst()
391 if (ConstantFoldLoadFromConstPtr(Src, LoadTy, APInt(IndexSize, Offset), DL)) in analyzeLoadFromClobberingMemInst()
397 Type *LoadTy, IRBuilderBase &Builder, in getStoreValueForLoadHelper() argument
404 if (SrcVal->getType()->isPointerTy() && LoadTy->isPointerTy() && in getStoreValueForLoadHelper()
406 cast<PointerType>(LoadTy)->getAddressSpace()) { in getStoreValueForLoadHelper()
412 uint64_t LoadSize = (DL.getTypeSizeInBits(LoadTy).getFixedSize() + 7) / 8; in getStoreValueForLoadHelper()
442 Value *getStoreValueForLoad(Value *SrcVal, unsigned Offset, Type *LoadTy, in getStoreValueForLoad() argument
446 SrcVal = getStoreValueForLoadHelper(SrcVal, Offset, LoadTy, Builder, DL); in getStoreValueForLoad()
447 return coerceAvailableValueToLoadType(SrcVal, LoadTy, Builder, DL); in getStoreValueForLoad()
451 Type *LoadTy, const DataLayout &DL) { in getConstantStoreValueForLoad() argument
452 return ConstantFoldLoadFromConst(SrcVal, LoadTy, APInt(32, Offset), DL); in getConstantStoreValueForLoad()
460 Value *getLoadValueForLoad(LoadInst *SrcVal, unsigned Offset, Type *LoadTy, in getLoadValueForLoad() argument
466 unsigned LoadSize = DL.getTypeStoreSize(LoadTy).getFixedSize(); in getLoadValueForLoad()
481 Type *DestTy = IntegerType::get(LoadTy->getContext(), NewLoadSize * 8); in getLoadValueForLoad()
504 return getStoreValueForLoad(SrcVal, Offset, LoadTy, InsertPt, DL); in getLoadValueForLoad()
508 Type *LoadTy, const DataLayout &DL) { in getConstantLoadValueForLoad() argument
511 unsigned LoadSize = DL.getTypeStoreSize(LoadTy).getFixedSize(); in getConstantLoadValueForLoad()
514 return getConstantStoreValueForLoad(SrcVal, Offset, LoadTy, DL); in getConstantLoadValueForLoad()
520 Type *LoadTy, Instruction *InsertPt, in getMemInstValueForLoad() argument
522 LLVMContext &Ctx = LoadTy->getContext(); in getMemInstValueForLoad()
523 uint64_t LoadSize = DL.getTypeSizeInBits(LoadTy).getFixedSize() / 8; in getMemInstValueForLoad()
555 return coerceAvailableValueToLoadType(Val, LoadTy, Builder, DL); in getMemInstValueForLoad()
562 return ConstantFoldLoadFromConstPtr(Src, LoadTy, APInt(IndexSize, Offset), in getMemInstValueForLoad()
567 Type *LoadTy, const DataLayout &DL) { in getConstantMemInstValueForLoad() argument
568 LLVMContext &Ctx = LoadTy->getContext(); in getConstantMemInstValueForLoad()
569 uint64_t LoadSize = DL.getTypeSizeInBits(LoadTy).getFixedSize() / 8; in getConstantMemInstValueForLoad()
579 return ConstantFoldLoadFromConst(Val, LoadTy, DL); in getConstantMemInstValueForLoad()
586 return ConstantFoldLoadFromConstPtr(Src, LoadTy, APInt(IndexSize, Offset), in getConstantMemInstValueForLoad()