@@ -550,8 +550,10 @@ def LLVM_InvokeOp : LLVM_Op<"invoke", [
550550 Variadic<LLVM_Type>:$callee_operands,
551551 Variadic<LLVM_Type>:$normalDestOperands,
552552 Variadic<LLVM_Type>:$unwindDestOperands,
553+ Variadic<LLVM_Type>:$bundle_operands,
553554 OptionalAttr<DenseI32ArrayAttr>:$branch_weights,
554- DefaultValuedAttr<CConv, "CConv::C">:$CConv);
555+ DefaultValuedAttr<CConv, "CConv::C">:$CConv,
556+ OptionalAttr<LLVM_OperandBundlesAttr>:$op_bundles);
555557 let results = (outs Optional<LLVM_Type>:$result);
556558 let successors = (successor AnySuccessor:$normalDest,
557559 AnySuccessor:$unwindDest);
@@ -587,7 +589,8 @@ def LLVM_LandingpadOp : LLVM_Op<"landingpad"> {
587589//===----------------------------------------------------------------------===//
588590
589591def LLVM_CallOp : LLVM_MemAccessOpBase<"call",
590- [DeclareOpInterfaceMethods<FastmathFlagsInterface>,
592+ [AttrSizedOperandSegments,
593+ DeclareOpInterfaceMethods<FastmathFlagsInterface>,
591594 DeclareOpInterfaceMethods<CallOpInterface>,
592595 DeclareOpInterfaceMethods<SymbolUserOpInterface>,
593596 DeclareOpInterfaceMethods<BranchWeightOpInterface>]> {
@@ -633,6 +636,7 @@ def LLVM_CallOp : LLVM_MemAccessOpBase<"call",
633636 dag args = (ins OptionalAttr<TypeAttrOf<LLVM_FunctionType>>:$var_callee_type,
634637 OptionalAttr<FlatSymbolRefAttr>:$callee,
635638 Variadic<LLVM_Type>:$callee_operands,
639+ Variadic<LLVM_Type>:$bundle_operands,
636640 DefaultValuedAttr<LLVM_FastmathFlagsAttr,
637641 "{}">:$fastmathFlags,
638642 OptionalAttr<DenseI32ArrayAttr>:$branch_weights,
@@ -641,7 +645,8 @@ def LLVM_CallOp : LLVM_MemAccessOpBase<"call",
641645 OptionalAttr<LLVM_MemoryEffectsAttr>:$memory_effects,
642646 OptionalAttr<UnitAttr>:$convergent,
643647 OptionalAttr<UnitAttr>:$no_unwind,
644- OptionalAttr<UnitAttr>:$will_return
648+ OptionalAttr<UnitAttr>:$will_return,
649+ OptionalAttr<LLVM_OperandBundlesAttr>:$op_bundles
645650 );
646651 // Append the aliasing related attributes defined in LLVM_MemAccessOpBase.
647652 let arguments = !con(args, aliasAttrs);
@@ -662,6 +667,7 @@ def LLVM_CallOp : LLVM_MemAccessOpBase<"call",
662667 OpBuilder<(ins "LLVMFunctionType":$calleeType, "StringRef":$callee,
663668 CArg<"ValueRange", "{}">:$args)>
664669 ];
670+ let hasVerifier = 1;
665671 let hasCustomAssemblyFormat = 1;
666672 let extraClassDeclaration = [{
667673 /// Returns the callee function type.
@@ -1875,21 +1881,28 @@ def LLVM_InlineAsmOp : LLVM_Op<"inline_asm", [DeclareOpInterfaceMethods<MemoryEf
18751881
18761882def LLVM_CallIntrinsicOp
18771883 : LLVM_Op<"call_intrinsic",
1878- [DeclareOpInterfaceMethods<FastmathFlagsInterface>]> {
1884+ [AttrSizedOperandSegments,
1885+ DeclareOpInterfaceMethods<FastmathFlagsInterface>]> {
18791886 let summary = "Call to an LLVM intrinsic function.";
18801887 let description = [{
18811888 Call the specified llvm intrinsic. If the intrinsic is overloaded, use
18821889 the MLIR function type of this op to determine which intrinsic to call.
18831890 }];
18841891 let arguments = (ins StrAttr:$intrin, Variadic<LLVM_Type>:$args,
1892+ Variadic<LLVM_Type>:$bundle_operands,
18851893 DefaultValuedAttr<LLVM_FastmathFlagsAttr,
1886- "{}">:$fastmathFlags);
1894+ "{}">:$fastmathFlags,
1895+ OptionalAttr<LLVM_OperandBundlesAttr>:$op_bundles);
18871896 let results = (outs Optional<LLVM_Type>:$results);
18881897 let llvmBuilder = [{
18891898 return convertCallLLVMIntrinsicOp(op, builder, moduleTranslation);
18901899 }];
18911900 let assemblyFormat = [{
1892- $intrin `(` $args `)` `:` functional-type($args, $results) attr-dict
1901+ $intrin `(` $args `)`
1902+ ( `bundlearg` `(` $bundle_operands^ `)` )?
1903+ `:` functional-type($args, $results)
1904+ ( `,` `tuple` `<` type($bundle_operands)^ `>` )?
1905+ attr-dict
18931906 }];
18941907
18951908 let hasVerifier = 1;
0 commit comments