[Mlir-commits] [mlir] c476be5 - [mlir][LLVMIR] Add `sym_name` attribute to LLVMFuncOp in ODS

Jeff Niu llvmlistbot at llvm.org
Tue Aug 23 10:02:23 PDT 2022


Author: Jeff Niu
Date: 2022-08-23T10:02:10-07:00
New Revision: c476be5ca4f3726afe0ecb61551ecd33f2fd89b9

URL: https://github.com/llvm/llvm-project/commit/c476be5ca4f3726afe0ecb61551ecd33f2fd89b9
DIFF: https://github.com/llvm/llvm-project/commit/c476be5ca4f3726afe0ecb61551ecd33f2fd89b9.diff

LOG: [mlir][LLVMIR] Add `sym_name` attribute to LLVMFuncOp in ODS

This is a required attribute for FunctionOpInterface. Add an ODS
definition so that a more efficient accessor is generated.

Added: 
    

Modified: 
    mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td b/mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
index 07900973a3020..adda259e8dfbb 100644
--- a/mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
+++ b/mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
@@ -1465,6 +1465,7 @@ def LLVM_LLVMFuncOp : LLVM_Op<"func", [
   }];
 
   let arguments = (ins
+    StrAttr:$sym_name,
     TypeAttrOf<LLVM_FunctionType>:$function_type,
     DefaultValuedAttr<Linkage, "Linkage::External">:$linkage,
     UnitAttr:$dso_local,


        


More information about the Mlir-commits mailing list