Home | History | Annotate | Download | only in CodeGen

Lines Matching full:numelements

563                                         llvm::Value *&numElements,
582 // We multiply the size of all dimensions for NumElements.
583 // e.g for 'int[2][3]', ElemType is 'int' and NumElements is 6.
584 numElements = CGF.EmitScalarExpr(e->getArraySize());
585 assert(isa<llvm::IntegerType>(numElements->getType()));
596 = cast<llvm::IntegerType>(numElements->getType());
617 dyn_cast<llvm::ConstantInt>(numElements)) {
626 // We want to do all this arithmetic in size_t. If numElements is
641 // Scale numElements by that. This might overflow, but we don't
644 numElements = llvm::ConstantInt::get(CGF.SizeTy,
673 // 1) if isSigned, we need to check whether numElements is negative;
675 // numElements is larger than something representable in size_t;
676 // 3) if minElements > 0, we need to check whether numElements is smaller
679 // sizeWithoutCookie := numElements * typeSizeMultiplier
697 hasOverflow = CGF.Builder.CreateICmpUGE(numElements, thresholdV);
698 numElements = CGF.Builder.CreateTrunc(numElements, CGF.SizeTy);
703 numElements = CGF.Builder.CreateSExt(numElements, CGF.SizeTy);
711 hasOverflow = CGF.Builder.CreateICmpSLT(numElements,
716 numElements = CGF.Builder.CreateZExt(numElements, CGF.SizeTy);
719 assert(numElements->getType() == CGF.SizeTy);
724 hasOverflow = CGF.Builder.CreateICmpULT(numElements,
731 CGF.Builder.CreateICmpULT(numElements,
736 size = numElements;
741 // This step also causes numElements to be scaled up by the
762 // Also scale up numElements by the array size multiplier.
768 numElements = size;
774 numElements = CGF.Builder.CreateMul(numElements, asmV);
778 // numElements doesn't need to be scaled.
853 llvm::Value *numElements) {
860 Builder.CreateInBoundsGEP(beginPtr, numElements, "array.end");
904 if (llvm::ConstantInt *constNum = dyn_cast<llvm::ConstantInt>(numElements)) {
974 llvm::Value *NumElements,
994 CGF.EmitCXXAggrConstructorCall(Ctor, NumElements, NewPtr,
1005 CGF.EmitNewArrayInitializer(E, ElementType, NewPtr, NumElements);
1193 llvm::Value *numElements = 0;
1196 EmitCXXNewAllocSize(*this, E, minElements, numElements,
1292 numElements,
1300 EmitNewInitializer(*this, E, allocType, result, numElements,
1472 llvm::Value *NumElements;
1478 llvm::Value *NumElements,
1481 : Ptr(Ptr), OperatorDelete(OperatorDelete), NumElements(NumElements),
1509 Size = CGF.Builder.CreateMul(Size, NumElements);
1534 llvm::Value *numElements = 0;
1538 numElements, allocatedPtr, cookieSize);
1546 numElements, elementType,
1551 assert(numElements && "no element count for a type with a destructor!");
1554 CGF.Builder.CreateInBoundsGEP(deletedPtr, numElements, "delete.end");