@@ -551,7 +551,13 @@ def LLVM_InvokeOp : LLVM_Op<"invoke", [
551
551
Variadic<LLVM_Type>:$normalDestOperands,
552
552
Variadic<LLVM_Type>:$unwindDestOperands,
553
553
OptionalAttr<DenseI32ArrayAttr>:$branch_weights,
554
- DefaultValuedAttr<CConv, "CConv::C">:$CConv);
554
+ DefaultValuedAttr<CConv, "CConv::C">:$CConv,
555
+ VariadicOfVariadic<LLVM_Type,
556
+ "op_bundle_sizes">:$op_bundle_operands,
557
+ DenseI32ArrayAttr:$op_bundle_sizes,
558
+ OptionalProperty<
559
+ ArrayProperty<StringProperty, "operand bundle tags">
560
+ >:$op_bundle_tags);
555
561
let results = (outs Optional<LLVM_Type>:$result);
556
562
let successors = (successor AnySuccessor:$normalDest,
557
563
AnySuccessor:$unwindDest);
@@ -587,7 +593,8 @@ def LLVM_LandingpadOp : LLVM_Op<"landingpad"> {
587
593
//===----------------------------------------------------------------------===//
588
594
589
595
def LLVM_CallOp : LLVM_MemAccessOpBase<"call",
590
- [DeclareOpInterfaceMethods<FastmathFlagsInterface>,
596
+ [AttrSizedOperandSegments,
597
+ DeclareOpInterfaceMethods<FastmathFlagsInterface>,
591
598
DeclareOpInterfaceMethods<CallOpInterface>,
592
599
DeclareOpInterfaceMethods<SymbolUserOpInterface>,
593
600
DeclareOpInterfaceMethods<BranchWeightOpInterface>]> {
@@ -641,8 +648,13 @@ def LLVM_CallOp : LLVM_MemAccessOpBase<"call",
641
648
OptionalAttr<LLVM_MemoryEffectsAttr>:$memory_effects,
642
649
OptionalAttr<UnitAttr>:$convergent,
643
650
OptionalAttr<UnitAttr>:$no_unwind,
644
- OptionalAttr<UnitAttr>:$will_return
645
- );
651
+ OptionalAttr<UnitAttr>:$will_return,
652
+ VariadicOfVariadic<LLVM_Type,
653
+ "op_bundle_sizes">:$op_bundle_operands,
654
+ DenseI32ArrayAttr:$op_bundle_sizes,
655
+ OptionalProperty<
656
+ ArrayProperty<StringProperty, "operand bundle tags">
657
+ >:$op_bundle_tags);
646
658
// Append the aliasing related attributes defined in LLVM_MemAccessOpBase.
647
659
let arguments = !con(args, aliasAttrs);
648
660
let results = (outs Optional<LLVM_Type>:$result);
@@ -662,6 +674,7 @@ def LLVM_CallOp : LLVM_MemAccessOpBase<"call",
662
674
OpBuilder<(ins "LLVMFunctionType":$calleeType, "StringRef":$callee,
663
675
CArg<"ValueRange", "{}">:$args)>
664
676
];
677
+ let hasVerifier = 1;
665
678
let hasCustomAssemblyFormat = 1;
666
679
let extraClassDeclaration = [{
667
680
/// Returns the callee function type.
@@ -1875,21 +1888,33 @@ def LLVM_InlineAsmOp : LLVM_Op<"inline_asm", [DeclareOpInterfaceMethods<MemoryEf
1875
1888
1876
1889
def LLVM_CallIntrinsicOp
1877
1890
: LLVM_Op<"call_intrinsic",
1878
- [DeclareOpInterfaceMethods<FastmathFlagsInterface>]> {
1891
+ [AttrSizedOperandSegments,
1892
+ DeclareOpInterfaceMethods<FastmathFlagsInterface>]> {
1879
1893
let summary = "Call to an LLVM intrinsic function.";
1880
1894
let description = [{
1881
1895
Call the specified llvm intrinsic. If the intrinsic is overloaded, use
1882
1896
the MLIR function type of this op to determine which intrinsic to call.
1883
1897
}];
1884
1898
let arguments = (ins StrAttr:$intrin, Variadic<LLVM_Type>:$args,
1885
1899
DefaultValuedAttr<LLVM_FastmathFlagsAttr,
1886
- "{}">:$fastmathFlags);
1900
+ "{}">:$fastmathFlags,
1901
+ VariadicOfVariadic<LLVM_Type,
1902
+ "op_bundle_sizes">:$op_bundle_operands,
1903
+ DenseI32ArrayAttr:$op_bundle_sizes,
1904
+ OptionalProperty<
1905
+ ArrayProperty<StringProperty, "operand bundle tags">
1906
+ >:$op_bundle_tags);
1887
1907
let results = (outs Optional<LLVM_Type>:$results);
1888
1908
let llvmBuilder = [{
1889
1909
return convertCallLLVMIntrinsicOp(op, builder, moduleTranslation);
1890
1910
}];
1891
1911
let assemblyFormat = [{
1892
- $intrin `(` $args `)` `:` functional-type($args, $results) attr-dict
1912
+ $intrin `(` $args `)`
1913
+ ( `bundlearg` `(` $op_bundle_operands^ `)` )?
1914
+ ( `bundletag` `(` $op_bundle_tags^ `)` )?
1915
+ `:` functional-type($args, $results)
1916
+ ( `bundletype` `(` type($op_bundle_operands)^ `)` )?
1917
+ attr-dict
1893
1918
}];
1894
1919
1895
1920
let hasVerifier = 1;
0 commit comments