[Mlir-commits] [mlir] [mlir][GPU] Refactor GPUOps lowering (PR #188905)

Hocky Yudhiono llvmlistbot at llvm.org
Thu Mar 26 21:10:27 PDT 2026


================
@@ -74,6 +75,69 @@ 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();
+
+  // TODO: How do we refactor this to be deny list?
+  NamedAttrList &discardable = loweredAttrs->discardableAttrs;
----------------
hockyy wrote:

@joker-eph can't seem to avoid this hardcoded removal of discardable attributes from gpu func.. Or probably add a dialect prefix?

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


More information about the Mlir-commits mailing list