[Mlir-commits] [mlir] [mlir][EmitC] Expand the MemRefToEmitC pass - Lowering `CopyOp` (PR #151206)

Jaden Angella llvmlistbot at llvm.org
Tue Aug 5 10:03:42 PDT 2025


================
@@ -57,31 +67,33 @@ struct ConvertMemRefToEmitCPass
     mlir::ModuleOp module = getOperation();
     module.walk([&](mlir::emitc::CallOpaqueOp callOp) {
       if (callOp.getCallee() != alignedAllocFunctionName &&
-          callOp.getCallee() != mallocFunctionName) {
+          callOp.getCallee() != mallocFunctionName &&
+          callOp.getCallee() != memcpyFunctionName)
         return mlir::WalkResult::advance();
-      }
 
       for (auto &op : *module.getBody()) {
         emitc::IncludeOp includeOp = llvm::dyn_cast<mlir::emitc::IncludeOp>(op);
-        if (!includeOp) {
+        if (!includeOp)
           continue;
-        }
+
         if (includeOp.getIsStandardInclude() &&
             ((options.lowerToCpp &&
               includeOp.getInclude() == cppStandardLibraryHeader) ||
              (!options.lowerToCpp &&
-              includeOp.getInclude() == cStandardLibraryHeader))) {
----------------
Jaddyen wrote:

yes, i should!
thanks for the pointer!

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


More information about the Mlir-commits mailing list