Lines Matching refs:TD
200 static Value *computeArraySize(const CallInst *CI, const DataLayout *TD, in computeArraySize() argument
208 if (!T || !T->isSized() || !TD) in computeArraySize()
211 unsigned ElementSize = TD->getTypeAllocSize(T); in computeArraySize()
213 ElementSize = TD->getStructLayout(ST)->getSizeInBytes(); in computeArraySize()
230 const DataLayout *TD, in isArrayMalloc() argument
233 Value *ArraySize = computeArraySize(CI, TD, TLI); in isArrayMalloc()
291 Value *llvm::getMallocArraySize(CallInst *CI, const DataLayout *TD, in getMallocArraySize() argument
295 return computeArraySize(CI, TD, TLI, LookThroughSExt); in getMallocArraySize()
357 bool llvm::getObjectSize(const Value *Ptr, uint64_t &Size, const DataLayout *TD, in getObjectSize() argument
359 if (!TD) in getObjectSize()
362 ObjectSizeOffsetVisitor Visitor(TD, TLI, Ptr->getContext(), RoundToAlign); in getObjectSize()
389 ObjectSizeOffsetVisitor::ObjectSizeOffsetVisitor(const DataLayout *TD, in ObjectSizeOffsetVisitor() argument
393 : TD(TD), TLI(TLI), RoundToAlign(RoundToAlign) { in ObjectSizeOffsetVisitor()
394 IntegerType *IntTy = TD->getIntPtrType(Context); in ObjectSizeOffsetVisitor()
437 APInt Size(IntTyBits, TD->getTypeAllocSize(I.getAllocatedType())); in visitAllocaInst()
456 APInt Size(IntTyBits, TD->getTypeAllocSize(PT->getElementType())); in visitArgument()
529 if (!bothKnown(PtrData) || !GEP.accumulateConstantOffset(*TD, Offset)) in visitGEPOperator()
545 APInt Size(IntTyBits, TD->getTypeAllocSize(GV.getType()->getElementType())); in visitGlobalVariable()
582 ObjectSizeOffsetEvaluator::ObjectSizeOffsetEvaluator(const DataLayout *TD, in ObjectSizeOffsetEvaluator() argument
585 : TD(TD), TLI(TLI), Context(Context), Builder(Context, TargetFolder(TD)) { in ObjectSizeOffsetEvaluator()
586 IntTy = TD->getIntPtrType(Context); in ObjectSizeOffsetEvaluator()
610 ObjectSizeOffsetVisitor Visitor(TD, TLI, Context); in compute_()
668 TD->getTypeAllocSize(I.getAllocatedType())); in visitAllocaInst()
720 Value *Offset = EmitGEPOffset(&Builder, *TD, &GEP, /*NoAssumptions=*/true); in visitGEPOperator()