Lines Matching refs:LoadTy
17 bool canCoerceMustAliasedValueToLoad(Value *StoredVal, Type *LoadTy, in canCoerceMustAliasedValueToLoad() argument
21 if (StoredTy == LoadTy) in canCoerceMustAliasedValueToLoad()
26 if (isFirstClassAggregateOrScalableType(LoadTy) || in canCoerceMustAliasedValueToLoad()
37 if (StoreSize < DL.getTypeSizeInBits(LoadTy).getFixedSize()) in canCoerceMustAliasedValueToLoad()
41 bool LoadNI = DL.isNonIntegralPointerType(LoadTy->getScalarType()); in canCoerceMustAliasedValueToLoad()
52 LoadTy->getPointerAddressSpace()) { in canCoerceMustAliasedValueToLoad()
60 if (StoredNI && StoreSize != DL.getTypeSizeInBits(LoadTy).getFixedSize()) in canCoerceMustAliasedValueToLoad()
176 static int analyzeLoadFromClobberingWrite(Type *LoadTy, Value *LoadPtr, in analyzeLoadFromClobberingWrite() argument
182 if (isFirstClassAggregateOrScalableType(LoadTy)) in analyzeLoadFromClobberingWrite()
192 uint64_t LoadSize = DL.getTypeSizeInBits(LoadTy).getFixedSize(); in analyzeLoadFromClobberingWrite()
226 int analyzeLoadFromClobberingStore(Type *LoadTy, Value *LoadPtr, in analyzeLoadFromClobberingStore() argument
234 if (!canCoerceMustAliasedValueToLoad(StoredVal, LoadTy, DL)) in analyzeLoadFromClobberingStore()
240 return analyzeLoadFromClobberingWrite(LoadTy, LoadPtr, StorePtr, StoreSize, in analyzeLoadFromClobberingStore()
332 int analyzeLoadFromClobberingLoad(Type *LoadTy, Value *LoadPtr, LoadInst *DepLI, in analyzeLoadFromClobberingLoad() argument
338 if (!canCoerceMustAliasedValueToLoad(DepLI, LoadTy, DL)) in analyzeLoadFromClobberingLoad()
343 int R = analyzeLoadFromClobberingWrite(LoadTy, LoadPtr, DepPtr, DepSize, DL); in analyzeLoadFromClobberingLoad()
352 unsigned LoadSize = DL.getTypeStoreSize(LoadTy).getFixedSize(); in analyzeLoadFromClobberingLoad()
364 return analyzeLoadFromClobberingWrite(LoadTy, LoadPtr, DepPtr, Size * 8, DL); in analyzeLoadFromClobberingLoad()
367 int analyzeLoadFromClobberingMemInst(Type *LoadTy, Value *LoadPtr, in analyzeLoadFromClobberingMemInst() argument
378 if (DL.isNonIntegralPointerType(LoadTy->getScalarType())) { in analyzeLoadFromClobberingMemInst()
383 return analyzeLoadFromClobberingWrite(LoadTy, LoadPtr, MI->getDest(), in analyzeLoadFromClobberingMemInst()
401 int Offset = analyzeLoadFromClobberingWrite(LoadTy, LoadPtr, MI->getDest(), in analyzeLoadFromClobberingMemInst()
417 Src = ConstantExpr::getBitCast(Src, PointerType::get(LoadTy, AS)); in analyzeLoadFromClobberingMemInst()
418 if (ConstantFoldLoadFromConstPtr(Src, LoadTy, DL)) in analyzeLoadFromClobberingMemInst()
424 static T *getStoreValueForLoadHelper(T *SrcVal, unsigned Offset, Type *LoadTy, in getStoreValueForLoadHelper() argument
432 if (SrcVal->getType()->isPointerTy() && LoadTy->isPointerTy() && in getStoreValueForLoadHelper()
434 cast<PointerType>(LoadTy)->getAddressSpace()) { in getStoreValueForLoadHelper()
440 uint64_t LoadSize = (DL.getTypeSizeInBits(LoadTy).getFixedSize() + 7) / 8; in getStoreValueForLoadHelper()
468 Value *getStoreValueForLoad(Value *SrcVal, unsigned Offset, Type *LoadTy, in getStoreValueForLoad() argument
472 SrcVal = getStoreValueForLoadHelper(SrcVal, Offset, LoadTy, Builder, DL); in getStoreValueForLoad()
473 return coerceAvailableValueToLoadTypeHelper(SrcVal, LoadTy, Builder, DL); in getStoreValueForLoad()
477 Type *LoadTy, const DataLayout &DL) { in getConstantStoreValueForLoad() argument
479 SrcVal = getStoreValueForLoadHelper(SrcVal, Offset, LoadTy, F, DL); in getConstantStoreValueForLoad()
480 return coerceAvailableValueToLoadTypeHelper(SrcVal, LoadTy, F, DL); in getConstantStoreValueForLoad()
488 Value *getLoadValueForLoad(LoadInst *SrcVal, unsigned Offset, Type *LoadTy, in getLoadValueForLoad() argument
494 unsigned LoadSize = DL.getTypeStoreSize(LoadTy).getFixedSize(); in getLoadValueForLoad()
509 Type *DestTy = IntegerType::get(LoadTy->getContext(), NewLoadSize * 8); in getLoadValueForLoad()
532 return getStoreValueForLoad(SrcVal, Offset, LoadTy, InsertPt, DL); in getLoadValueForLoad()
536 Type *LoadTy, const DataLayout &DL) { in getConstantLoadValueForLoad() argument
539 unsigned LoadSize = DL.getTypeStoreSize(LoadTy).getFixedSize(); in getConstantLoadValueForLoad()
542 return getConstantStoreValueForLoad(SrcVal, Offset, LoadTy, DL); in getConstantLoadValueForLoad()
547 Type *LoadTy, HelperClass &Helper, in getMemInstValueForLoadHelper() argument
549 LLVMContext &Ctx = LoadTy->getContext(); in getMemInstValueForLoadHelper()
550 uint64_t LoadSize = DL.getTypeSizeInBits(LoadTy).getFixedSize() / 8; in getMemInstValueForLoadHelper()
580 return coerceAvailableValueToLoadTypeHelper(Val, LoadTy, Helper, DL); in getMemInstValueForLoadHelper()
598 Src = ConstantExpr::getBitCast(Src, PointerType::get(LoadTy, AS)); in getMemInstValueForLoadHelper()
599 return ConstantFoldLoadFromConstPtr(Src, LoadTy, DL); in getMemInstValueForLoadHelper()
605 Type *LoadTy, Instruction *InsertPt, in getMemInstValueForLoad() argument
609 LoadTy, Builder, DL); in getMemInstValueForLoad()
613 Type *LoadTy, const DataLayout &DL) { in getConstantMemInstValueForLoad() argument
621 LoadTy, F, DL); in getConstantMemInstValueForLoad()