[Mlir-commits] [flang] [mlir] [mlir][GPU] Refactor GPUOps lowering (PR #188905)
Hocky Yudhiono
llvmlistbot at llvm.org
Mon Mar 30 04:10:51 PDT 2026
================
@@ -74,6 +78,55 @@ LLVM::GlobalOp mlir::getOrCreateStringConstant(OpBuilder &b, Location loc,
name, attr, alignment, addrSpace);
}
+FailureOr<LowerLLVMFuncAttrs> GPUFuncOpLowering::buildLoweredGPULLVMFuncAttrs(
+ gpu::GPUFuncOp gpuFuncOp, Type llvmFuncType, OpBuilder &rewriter) const {
+ FailureOr<LowerLLVMFuncAttrs> loweredAttrs =
+ lowerDiscardableAttrsForLLVMFunc(gpuFuncOp);
+ if (failed(loweredAttrs))
+ return failure();
+
+ MLIRContext *ctx = rewriter.getContext();
+ LLVM::LLVMFuncOp::Properties &props = loweredAttrs->properties;
+ props.sym_name = rewriter.getStringAttr(gpuFuncOp.getName());
+ props.function_type = TypeAttr::get(llvmFuncType);
----------------
hockyy wrote:
8e00f6586d3f i will have to pass in the type
https://github.com/llvm/llvm-project/pull/188905
More information about the Mlir-commits
mailing list