================
@@ -6135,6 +6133,21 @@ static llvm::Function
*getOmpTargetAlloc(llvm::IRBuilderBase &builder,
return func;
}
+static llvm::Value *
+getAllocationSize(llvm::IRBuilderBase &builder,
+ LLVM::ModuleTranslation &moduleTranslation, Type allocatedTy,
+ OperandRange typeparams, OperandRange shape) {
+ llvm::DataLayout dataLayout =
+ moduleTranslation.getLLVMModule()->getDataLayout();
+ llvm::Type *llvmHeapTy = moduleTranslation.convertType(allocatedTy);
+ llvm::TypeSize typeSize = dataLayout.getTypeStoreSize(llvmHeapTy);
----------------
skc7 wrote:
getTypeAllocSize() would be better to use here since it considers any alignment
aswell.
https://github.com/llvm/llvm-project/pull/161862
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits