[clang] [CIR] cir.call with scalar return type (PR #135552)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 14 10:58:24 PDT 2025
================
@@ -18,9 +18,12 @@
using namespace clang;
using namespace clang::CIRGen;
-CIRGenFunctionInfo *CIRGenFunctionInfo::create() {
- // For now we just create an empty CIRGenFunctionInfo.
- CIRGenFunctionInfo *fi = new CIRGenFunctionInfo();
+CIRGenFunctionInfo *CIRGenFunctionInfo::create(CanQualType resultType) {
+ void *buffer = operator new(totalSizeToAlloc<ArgInfo>(1));
----------------
erichkeane wrote:
This is REALLY strange to be calling global-operator-new directly, and we probably don't want to.
Additionally, we use allocators in the 'context' somewhere, so I suspect that MLIRContext has an allocator?
THOUGH It looks from `https://mlir.llvm.org/doxygen/IR_2Operation_8cpp_source.html#l00082` that mlir might be calling `malloc`, which is curious.
What is our allocation story for MLIR/CIR?
https://github.com/llvm/llvm-project/pull/135552
More information about the cfe-commits
mailing list