Home
last modified time | relevance | path

Searched refs:AllocSize (Results 1 – 25 of 55) sorted by relevance

123

/freebsd/contrib/llvm-project/clang/lib/Interpreter/
H A DValue.cpp32 static unsigned char *CreatePayload(void *DtorF, size_t AllocSize, in CreatePayload() argument
34 if (AllocSize < sizeof(Canary)) in CreatePayload()
35 AllocSize = sizeof(Canary); in CreatePayload()
37 new unsigned char[ValueStorage::getPayloadOffset() + AllocSize]; in CreatePayload()
38 ValueStorage *VS = new (Buf) ValueStorage(DtorF, AllocSize, ElementsSize); in CreatePayload()
65 size_t Stride = AllocSize / Elements; in Release()
81 ValueStorage(void *DtorF, size_t AllocSize, size_t ElementsNum) in ValueStorage() argument
83 AllocSize(AllocSize), Elements(ElementsNum) {} in ValueStorage()
87 size_t AllocSize = 0; member in __anon8d9d85ba0111::ValueStorage
160 size_t AllocSize = in Value() local
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Target/AMDGPU/
H A DAMDGPULowerKernelArguments.cpp50 bool tryAllocPreloadSGPRs(unsigned AllocSize, uint64_t ArgOffset, in tryAllocPreloadSGPRs() argument
54 if (!isAligned(Align(4), ArgOffset) && AllocSize < 4) in tryAllocPreloadSGPRs()
60 unsigned NumPreloadSGPRs = alignTo(AllocSize, 4) / 4; in tryAllocPreloadSGPRs()
139 uint64_t AllocSize = DL.getTypeAllocSize(ArgTy); in lowerKernelArguments() local
143 ExplicitArgOffset = alignTo(ExplicitArgOffset, ABITypeAlign) + AllocSize; in lowerKernelArguments()
148 if (PreloadInfo.tryAllocPreloadSGPRs(AllocSize, EltOffset, in lowerKernelArguments()
H A DAMDGPUPromoteAlloca.cpp1323 uint64_t AllocSize = DL.getTypeAllocSize(GV->getValueType()); in hasSufficientLocalMem() local
1327 if (GV->hasExternalLinkage() && AllocSize == 0) { in hasSufficientLocalMem()
1335 AllocatedSizes.emplace_back(AllocSize, Alignment); in hasSufficientLocalMem()
1442 uint32_t AllocSize = in tryPromoteAllocaToLDS() local
1444 NewSize += AllocSize; in tryPromoteAllocaToLDS()
1447 LLVM_DEBUG(dbgs() << " " << AllocSize in tryPromoteAllocaToLDS()
/freebsd/contrib/llvm-project/llvm/include/llvm/ADT/
H A DStringMapEntry.h51 size_t AllocSize = EntrySize + KeyLength + 1; in allocateWithKey() local
52 void *Allocation = Allocator.Allocate(AllocSize, EntryAlign); in allocateWithKey()
144 size_t AllocSize = sizeof(StringMapEntry) + this->getKeyLength() + 1; in Destroy() local
146 allocator.Deallocate(static_cast<void *>(this), AllocSize, in Destroy()
/freebsd/contrib/llvm-project/clang/lib/AST/Interp/
H A DDescriptor.cpp289 MDSize(MD.value_or(0)), AllocSize(align(Size + MDSize)), PrimT(Type), in Descriptor()
293 assert(AllocSize >= Size); in Descriptor()
303 AllocSize(align(MDSize) + align(Size) + sizeof(InitMapPtr)), PrimT(Type), in Descriptor()
316 AllocSize(MDSize + sizeof(InitMapPtr) + alignof(void *)), IsConst(true), in Descriptor()
329 AllocSize(std::max<size_t>(alignof(void *), Size) + MDSize), in Descriptor()
341 AllocSize(MDSize + alignof(void *)), ElemDesc(Elem), IsConst(true), in Descriptor()
351 Size(ElemSize), MDSize(MD.value_or(0)), AllocSize(Size + MDSize), in Descriptor()
360 : Source(D), ElemSize(1), Size(1), MDSize(0), AllocSize(MDSize), in Descriptor()
H A DDescriptor.h118 const unsigned AllocSize; member
133 std::numeric_limits<decltype(AllocSize)>::max() - sizeof(InitMapPtr) -
226 unsigned getAllocSize() const { return AllocSize; } in getAllocSize()
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/
H A DStackProtector.cpp255 static bool HasAddressTaken(const Instruction *AI, TypeSize AllocSize, in HasAddressTaken()
265 !TypeSize::isKnownGE(AllocSize, MemLoc->Size.getValue()))
303 if (!TypeSize::isKnownGT(AllocSize, OffsetSize)) in requiresStackProtector()
305 // Adjust AllocSize to be the space remaining after this offset. in requiresStackProtector()
309 TypeSize::getFixed(AllocSize.getKnownMinValue()) - OffsetSize; in requiresStackProtector()
317 if (HasAddressTaken(I, AllocSize, M, VisitedPHIs)) in requiresStackProtector()
325 if (HasAddressTaken(PN, AllocSize, M, VisitedPHIs)) in requiresStackProtector()
171 HasAddressTaken(const Instruction * AI,TypeSize AllocSize,Module * M,SmallPtrSet<const PHINode *,16> & VisitedPHIs) HasAddressTaken() argument
H A DGlobalMerge.cpp693 TypeSize AllocSize = DL.getTypeAllocSize(Ty); in run() local
694 if (AllocSize < Opt.MaxOffset && AllocSize >= Opt.MinSize) { in run()
/freebsd/contrib/llvm-project/compiler-rt/lib/ctx_profile/
H A DCtxInstrProfiling.cpp165 auto AllocSize = ContextNode::getAllocSize(NrCounters, NrCallsites); in getCallsiteSlow() local
167 char *AllocPlace = Mem->tryBumpAllocate(AllocSize); in getCallsiteSlow()
175 Mem->allocateNewArena(getArenaAllocSize(AllocSize), Mem); in getCallsiteSlow()
176 AllocPlace = Mem->tryBumpAllocate(AllocSize); in getCallsiteSlow()
/freebsd/contrib/llvm-project/compiler-rt/lib/gwp_asan/
H A Dcommon.cpp41 size_t AllocSize) { in RecordAllocation() argument
43 RequestedSize = AllocSize; in RecordAllocation()
/freebsd/contrib/llvm-project/llvm/lib/Support/Windows/
H A DMemory.inc132 size_t AllocSize = NumBlocks * Granularity;
133 void *PA = ::VirtualAlloc(reinterpret_cast<void *>(Start), AllocSize,
146 Result.AllocatedSize = AllocSize;
150 Memory::InvalidateInstructionCache(Result.Address, AllocSize);
/freebsd/contrib/llvm-project/llvm/lib/ExecutionEngine/Orc/TargetProcess/
H A DSimpleExecutorMemoryManager.cpp59 size_t AllocSize = 0; in finalize() local
68 AllocSize = I->second.Size; in finalize()
71 ExecutorAddr AllocEnd = Base + ExecutorAddrDiff(AllocSize); in finalize()
/freebsd/contrib/llvm-project/llvm/lib/Demangle/
H A DItaniumDemangle.cpp295 static constexpr size_t AllocSize = 4096; member in __anon00a841f00211::BumpPointerAllocator
296 static constexpr size_t UsableAllocSize = AllocSize - sizeof(BlockMeta);
298 alignas(long double) char InitialBuffer[AllocSize];
302 char* NewMeta = static_cast<char *>(std::malloc(AllocSize)); in grow()
/freebsd/contrib/llvm-project/llvm/lib/IR/
H A DMangler.cpp109 uint64_t AllocSize = A.hasPassPointeeByValueCopyAttr() ? in addByteCountSuffix() local
114 ArgWords += alignTo(AllocSize, PtrSize); in addByteCountSuffix()
H A DIRBuilder.cpp303 Value *AllocSize, Value *ArraySize, in CreateMalloc() argument
316 if (isConstantOne(AllocSize)) { in CreateMalloc()
317 AllocSize = ArraySize; // Operand * 1 = Operand in CreateMalloc()
320 AllocSize = CreateMul(ArraySize, AllocSize, "mallocsize"); in CreateMalloc()
324 assert(AllocSize->getType() == IntPtrTy && "malloc arg is wrong size"); in CreateMalloc()
332 CallInst *MCall = CreateCall(MallocFunc, AllocSize, OpB, Name); in CreateMalloc()
346 Value *AllocSize, Value *ArraySize, in CreateMalloc() argument
349 return CreateMalloc(IntPtrTy, AllocTy, AllocSize, ArraySize, std::nullopt, in CreateMalloc()
H A DAttributes.cpp294 return get(Context, AllocSize, packAllocSizeArgs(ElemSizeArg, NumElemsArg)); in getWithAllocSizeArgs()
454 assert(hasAttribute(Attribute::AllocSize) && in getAllocSizeArgs()
562 if (hasAttribute(Attribute::AllocSize)) { in getAsString()
1145 if (auto A = findEnumAttribute(Attribute::AllocSize)) in getAllocSizeArgs()
1909 Attribute A = getAttribute(Attribute::AllocSize); in getAllocSizeArgs()
1954 return addRawIntAttr(Attribute::AllocSize, RawArgs); in addAllocSizeAttrFromRawRepr()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/IPO/
H A DArgumentPromotion.cpp187 if (auto AllocSize = NF->getAttributes().getFnAttrs().getAllocSizeArgs()) { in doPromotion() local
188 unsigned Arg1 = NewArgIndices[AllocSize->first]; in doPromotion()
191 if (AllocSize->second) { in doPromotion()
192 Arg2 = NewArgIndices[*AllocSize->second]; in doPromotion()
H A DGlobalOpt.cpp913 uint64_t AllocSize, Constant *InitVal, in OptimizeGlobalAddressOfAllocation() argument
921 AllocSize); in OptimizeGlobalAddressOfAllocation()
938 Builder.CreateMemSet(NewGV, InitVal, AllocSize, std::nullopt); in OptimizeGlobalAddressOfAllocation()
1088 uint64_t AllocSize; in tryToOptimizeStoreOfAllocationToGlobal() local
1089 if (!getObjectSize(CI, AllocSize, DL, TLI, ObjectSizeOpts())) in tryToOptimizeStoreOfAllocationToGlobal()
1095 if (AllocSize >= 2048) in tryToOptimizeStoreOfAllocationToGlobal()
1114 OptimizeGlobalAddressOfAllocation(GV, CI, AllocSize, InitVal, DL, TLI); in tryToOptimizeStoreOfAllocationToGlobal()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/
H A DSROA.cpp1019 const uint64_t AllocSize; member in AllocaSlices::SliceBuilder
1031 AllocSize(DL.getTypeAllocSize(AI.getAllocatedType()).getFixedValue()), in SliceBuilder()
1044 if (Size == 0 || Offset.uge(AllocSize)) { in insertUse()
1048 << AllocSize << " byte alloca:\n" in insertUse()
1063 assert(AllocSize >= BeginOffset); // Established above. in insertUse()
1064 if (Size > AllocSize - BeginOffset) { in insertUse()
1066 << Offset << " to remain within the " << AllocSize in insertUse()
1070 EndOffset = AllocSize; in insertUse()
1143 if (Size > AllocSize || Offset.ugt(AllocSize - Size)) { in visitStoreInst()
1146 << AllocSize << " byte alloca:\n" in visitStoreInst()
[all …]
/freebsd/contrib/llvm-project/clang/lib/CodeGen/Targets/
H A DSparc.cpp313 auto AllocSize = getDataLayout().getTypeAllocSize(AI.getCoerceToType()); in EmitVAArg() local
314 Stride = CharUnits::fromQuantity(AllocSize).alignTo(SlotSize); in EmitVAArg()
/freebsd/contrib/llvm-project/clang/lib/CodeGen/
H A DCGExprCXX.cpp1434 ValueTy AllocSize; member in __anondca4c77a0411::CallDeleteDuringNew
1448 ValueTy AllocSize, bool PassAlignmentToPlacementDelete, in CallDeleteDuringNew() argument
1452 OperatorDelete(OperatorDelete), Ptr(Ptr), AllocSize(AllocSize), in CallDeleteDuringNew()
1485 DeleteArgs.add(Traits::get(CGF, AllocSize), in Emit()
1514 llvm::Value *AllocSize, in EnterNewDeleteCleanup() argument
1533 NewPtr.emitRawPointer(CGF), AllocSize, E->passAlignment(), AllocAlign); in EnterNewDeleteCleanup()
1546 DominatingValue<RValue>::save(CGF, RValue::get(AllocSize)); in EnterNewDeleteCleanup()
/freebsd/contrib/llvm-project/clang/lib/Rewrite/
H A DRewriteRope.cpp798 unsigned AllocSize = offsetof(RopeRefCountString, Data) + AllocChunkSize; in MakeRopeString() local
799 auto *Res = reinterpret_cast<RopeRefCountString *>(new char[AllocSize]); in MakeRopeString()
/freebsd/contrib/llvm-project/llvm/lib/Target/AArch64/
H A DAArch64FrameLowering.h158 int64_t RealignmentPadding, StackOffset AllocSize,
/freebsd/contrib/llvm-project/llvm/lib/Target/NVPTX/
H A DNVPTXAsmPrinter.cpp1838 int AllocSize = DL.getTypeAllocSize(CPV->getType()); in bufferLEByte() local
1842 AggBuffer->addZeros(Bytes ? Bytes : AllocSize); in bufferLEByte()
1879 AggBuffer->addZeros(AllocSize); in bufferLEByte()
1900 AggBuffer->addZeros(AllocSize); in bufferLEByte()
1909 if (Bytes > AllocSize) in bufferLEByte()
1910 AggBuffer->addZeros(Bytes - AllocSize); in bufferLEByte()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Utils/
H A DAMDGPUEmitPrintf.cpp279 int AllocSize = M->getDataLayout().getTypeAllocSize(Args[i]->getType()); in callBufferedPrintfStart() local
282 BufSize += std::max(AllocSize, 8); in callBufferedPrintfStart()

123