@@ -550,8 +550,10 @@ def LLVM_InvokeOp : LLVM_Op<"invoke", [
550
550
Variadic<LLVM_Type>:$callee_operands,
551
551
Variadic<LLVM_Type>:$normalDestOperands,
552
552
Variadic<LLVM_Type>:$unwindDestOperands,
553
+ Variadic<LLVM_Type>:$bundle_operands,
553
554
OptionalAttr<DenseI32ArrayAttr>:$branch_weights,
554
- DefaultValuedAttr<CConv, "CConv::C">:$CConv);
555
+ DefaultValuedAttr<CConv, "CConv::C">:$CConv,
556
+ OptionalAttr<LLVM_OperandBundlesAttr>:$op_bundles);
555
557
let results = (outs Optional<LLVM_Type>:$result);
556
558
let successors = (successor AnySuccessor:$normalDest,
557
559
AnySuccessor:$unwindDest);
@@ -587,7 +589,8 @@ def LLVM_LandingpadOp : LLVM_Op<"landingpad"> {
587
589
//===----------------------------------------------------------------------===//
588
590
589
591
def LLVM_CallOp : LLVM_MemAccessOpBase<"call",
590
- [DeclareOpInterfaceMethods<FastmathFlagsInterface>,
592
+ [AttrSizedOperandSegments,
593
+ DeclareOpInterfaceMethods<FastmathFlagsInterface>,
591
594
DeclareOpInterfaceMethods<CallOpInterface>,
592
595
DeclareOpInterfaceMethods<SymbolUserOpInterface>,
593
596
DeclareOpInterfaceMethods<BranchWeightOpInterface>]> {
@@ -633,6 +636,7 @@ def LLVM_CallOp : LLVM_MemAccessOpBase<"call",
633
636
dag args = (ins OptionalAttr<TypeAttrOf<LLVM_FunctionType>>:$var_callee_type,
634
637
OptionalAttr<FlatSymbolRefAttr>:$callee,
635
638
Variadic<LLVM_Type>:$callee_operands,
639
+ Variadic<LLVM_Type>:$bundle_operands,
636
640
DefaultValuedAttr<LLVM_FastmathFlagsAttr,
637
641
"{}">:$fastmathFlags,
638
642
OptionalAttr<DenseI32ArrayAttr>:$branch_weights,
@@ -641,7 +645,8 @@ def LLVM_CallOp : LLVM_MemAccessOpBase<"call",
641
645
OptionalAttr<LLVM_MemoryEffectsAttr>:$memory_effects,
642
646
OptionalAttr<UnitAttr>:$convergent,
643
647
OptionalAttr<UnitAttr>:$no_unwind,
644
- OptionalAttr<UnitAttr>:$will_return
648
+ OptionalAttr<UnitAttr>:$will_return,
649
+ OptionalAttr<LLVM_OperandBundlesAttr>:$op_bundles
645
650
);
646
651
// Append the aliasing related attributes defined in LLVM_MemAccessOpBase.
647
652
let arguments = !con(args, aliasAttrs);
@@ -662,6 +667,7 @@ def LLVM_CallOp : LLVM_MemAccessOpBase<"call",
662
667
OpBuilder<(ins "LLVMFunctionType":$calleeType, "StringRef":$callee,
663
668
CArg<"ValueRange", "{}">:$args)>
664
669
];
670
+ let hasVerifier = 1;
665
671
let hasCustomAssemblyFormat = 1;
666
672
let extraClassDeclaration = [{
667
673
/// Returns the callee function type.
@@ -1875,21 +1881,28 @@ def LLVM_InlineAsmOp : LLVM_Op<"inline_asm", [DeclareOpInterfaceMethods<MemoryEf
1875
1881
1876
1882
def LLVM_CallIntrinsicOp
1877
1883
: LLVM_Op<"call_intrinsic",
1878
- [DeclareOpInterfaceMethods<FastmathFlagsInterface>]> {
1884
+ [AttrSizedOperandSegments,
1885
+ DeclareOpInterfaceMethods<FastmathFlagsInterface>]> {
1879
1886
let summary = "Call to an LLVM intrinsic function.";
1880
1887
let description = [{
1881
1888
Call the specified llvm intrinsic. If the intrinsic is overloaded, use
1882
1889
the MLIR function type of this op to determine which intrinsic to call.
1883
1890
}];
1884
1891
let arguments = (ins StrAttr:$intrin, Variadic<LLVM_Type>:$args,
1892
+ Variadic<LLVM_Type>:$bundle_operands,
1885
1893
DefaultValuedAttr<LLVM_FastmathFlagsAttr,
1886
- "{}">:$fastmathFlags);
1894
+ "{}">:$fastmathFlags,
1895
+ OptionalAttr<LLVM_OperandBundlesAttr>:$op_bundles);
1887
1896
let results = (outs Optional<LLVM_Type>:$results);
1888
1897
let llvmBuilder = [{
1889
1898
return convertCallLLVMIntrinsicOp(op, builder, moduleTranslation);
1890
1899
}];
1891
1900
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
1893
1906
}];
1894
1907
1895
1908
let hasVerifier = 1;
0 commit comments