[Mlir-commits] [mlir] [mlir][memref] Fix hoist-static-allocs option of buffer-results-to-out-params when function parameters are returned (PR #102093)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Tue Aug 6 06:21:14 PDT 2024


================
@@ -102,6 +102,14 @@ updateFuncOp(func::FuncOp func,
   return success();
 }
 
+static bool isFunctionArgument(mlir::Value value) {
+  // Check if the value is a Function argument
+  if (auto blockArg = dyn_cast<mlir::BlockArgument>(value)) {
+    return blockArg.getOwner()->isEntryBlock();
+  }
+  return false;
+}
----------------
Menooker wrote:

So is there a way to check if a value is a func arg?

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


More information about the Mlir-commits mailing list