[Mlir-commits] [mlir] [mlir][LLVMIR] Add IFuncOp to LLVM dialect (PR #147697)
Tobias Gysi
llvmlistbot at llvm.org
Wed Jul 9 12:50:22 PDT 2025
================
@@ -1601,6 +1605,42 @@ def LLVM_AliasOp : LLVM_Op<"mlir.alias",
let hasRegionVerifier = 1;
}
+def LLVM_IFuncOp : LLVM_Op<"mlir.ifunc",
+ [IsolatedFromAbove, Symbol, DeclareOpInterfaceMethods<SymbolUserOpInterface>]> {
+ let arguments = (ins
+ SymbolNameAttr:$sym_name,
+ TypeAttr:$i_func_type,
+ FlatSymbolRefAttr:$resolver,
+ TypeAttr:$resolver_type,
+ UnitAttr:$dso_local,
+ DefaultValuedAttr<ConfinedAttr<I32Attr, [IntNonNegative]>, "0">:$address_space,
+ DefaultValuedAttr<Linkage, "mlir::LLVM::Linkage::External">:$linkage,
----------------
gysit wrote:
For functions and globals we put the linkage always before dso_local. Should we do this here as well?
Also was there a specific reason to use a DefaultValuedAttr for the linkage. AliasOp and GlobalOp always print the value which seems reasonable for such a relevant attribute (Or did you want to follow FuncOp?).
https://github.com/llvm/llvm-project/pull/147697
More information about the Mlir-commits
mailing list