[Mlir-commits] [mlir] [mlir][LLVM] Add operand bundle support (PR #108933)
Tobias Gysi
llvmlistbot at llvm.org
Thu Sep 19 23:19:57 PDT 2024
================
@@ -1875,21 +1888,33 @@ def LLVM_InlineAsmOp : LLVM_Op<"inline_asm", [DeclareOpInterfaceMethods<MemoryEf
def LLVM_CallIntrinsicOp
: LLVM_Op<"call_intrinsic",
- [DeclareOpInterfaceMethods<FastmathFlagsInterface>]> {
+ [AttrSizedOperandSegments,
+ DeclareOpInterfaceMethods<FastmathFlagsInterface>]> {
let summary = "Call to an LLVM intrinsic function.";
let description = [{
Call the specified llvm intrinsic. If the intrinsic is overloaded, use
the MLIR function type of this op to determine which intrinsic to call.
}];
let arguments = (ins StrAttr:$intrin, Variadic<LLVM_Type>:$args,
DefaultValuedAttr<LLVM_FastmathFlagsAttr,
- "{}">:$fastmathFlags);
+ "{}">:$fastmathFlags,
+ VariadicOfVariadic<LLVM_Type,
+ "op_bundle_sizes">:$op_bundle_operands,
+ DenseI32ArrayAttr:$op_bundle_sizes,
+ OptionalProperty<
+ ArrayProperty<StringProperty, "operand bundle tags">
+ >:$op_bundle_tags);
let results = (outs Optional<LLVM_Type>:$results);
let llvmBuilder = [{
return convertCallLLVMIntrinsicOp(op, builder, moduleTranslation);
}];
let assemblyFormat = [{
- $intrin `(` $args `)` `:` functional-type($args, $results) attr-dict
+ $intrin `(` $args `)`
+ ( `bundlearg` `(` $op_bundle_operands^ `)` )?
+ ( `bundletag` `(` $op_bundle_tags^ `)` )?
+ `:` functional-type($args, $results)
+ ( `bundletype` `(` type($op_bundle_operands)^ `)` )?
----------------
gysit wrote:
I am supportive of @zero9178 's proposal. It seems to simplify things and sticking to LLVM syntax is a plus.
https://github.com/llvm/llvm-project/pull/108933
More information about the Mlir-commits
mailing list