Home | History | Annotate | Download | only in Analysis

Lines Matching defs:Size

48   // First and Second size parameters (or -1 if unused)
215 // The size of the malloc's result type must be known to determine array size.
278 /// getMallocArraySize - Returns the array size of a malloc call. If the
279 /// argument passed to malloc is a multiple of the size of the malloced type,
281 /// constant 1. Otherwise, return NULL for mallocs whose array size cannot be
345 // Utility functions to compute size of objects.
349 /// \brief Compute the size of the object pointed by Ptr. Returns true and the
350 /// object size in Size if successful, and false otherwise.
351 /// If RoundToAlign is true, then Size is rounded up to the aligment of allocas,
353 bool llvm::getObjectSize(const Value *Ptr, uint64_t &Size, const DataLayout &DL,
363 Size = 0;
365 Size = (ObjSize - Offset).getZExtValue();
371 "Number of arguments with unsolved size and offset");
373 "Number of load instructions with unsolved size and offset");
376 APInt ObjectSizeOffsetVisitor::align(APInt Size, uint64_t Align) {
378 return APInt(IntTyBits, RoundUpToAlignment(Size.getZExtValue(), Align));
379 return Size;
387 // Pointer size must be rechecked for each object visited since it could have
432 APInt Size(IntTyBits, DL.getTypeAllocSize(I.getAllocatedType()));
434 return std::make_pair(align(Size, I.getAlignment()), Zero);
438 Size *= C->getValue().zextOrSelf(IntTyBits);
439 return std::make_pair(align(Size, I.getAlignment()), Zero);
451 APInt Size(IntTyBits, DL.getTypeAllocSize(PT->getElementType()));
452 return std::make_pair(align(Size, A.getParamAlignment()), Zero);
463 APInt Size(IntTyBits, GetStringLength(CS.getArgument(0)));
464 if (!Size)
474 if (Size.ugt(MaxSize))
475 Size = MaxSize + 1;
477 return std::make_pair(Size, Zero);
484 APInt Size = Arg->getValue().zextOrSelf(IntTyBits);
485 // size determined by just 1 parameter
487 return std::make_pair(Size, Zero);
493 Size *= Arg->getValue().zextOrSelf(IntTyBits);
494 return std::make_pair(Size, Zero);
540 APInt Size(IntTyBits, DL.getTypeAllocSize(GV.getType()->getElementType()));
541 return std::make_pair(align(Size, GV.getAlignment()), Zero);
628 // now compute the size and offset
668 Value *Size = ConstantInt::get(ArraySize->getType(),
670 Size = Builder.CreateMul(Size, ArraySize);
671 return std::make_pair(Size, Zero);
693 Value *Size = Builder.CreateMul(FirstArg, SecondArg);
694 return std::make_pair(Size, Zero);
736 // create 2 PHIs: one for size and another for offset
743 // compute offset/size for each PHI incoming pointer
759 Value *Size = SizePHI, *Offset = OffsetPHI, *Tmp;
761 Size = Tmp;
762 SizePHI->replaceAllUsesWith(Size);
770 return std::make_pair(Size, Offset);
782 Value *Size = Builder.CreateSelect(I.getCondition(), TrueSide.first,
786 return std::make_pair(Size, Offset);