[Mlir-commits] [mlir] [mlir][LLVM] Add operand bundle support (PR #108933)

Sirui Mu llvmlistbot at llvm.org
Mon Sep 23 08:20:53 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)^ `)` )?
----------------
Lancern wrote:

Updated to use this syntax.

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


More information about the Mlir-commits mailing list