[clang] [CIR] Upstream basic alloca and load support (PR #128792)

Andy Kaylor via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 26 10:23:16 PST 2025


================
@@ -117,6 +117,24 @@ static void printOmittedTerminatorRegion(mlir::OpAsmPrinter &printer,
                       /*printBlockTerminators=*/!omitRegionTerm(region));
 }
 
+//===----------------------------------------------------------------------===//
+// AllocaOp
+//===----------------------------------------------------------------------===//
+
+void cir::AllocaOp::build(::mlir::OpBuilder &odsBuilder,
----------------
andykaylor wrote:

MLIR is so many levels deep in templates and auto-generated code here that it makes my head hurt. This function gets called from the call to `create<cir::AllocaOp>` in CIRBaseBuilder.h. This is a static member function in the `cir::AllocaOp` class that gets generated from CIROps.td, but only the declaration is generated, so we have to provide the definition here.

https://github.com/llvm/llvm-project/pull/128792


More information about the cfe-commits mailing list