@@ -660,12 +660,12 @@ def LLVM_FPTruncOp : LLVM_CastOp<"fptrunc", "FPTrunc",
660660 LLVM_ScalarOrVectorOf<LLVM_AnyFloat>>;
661661
662662// Call-related operations.
663- def LLVM_InvokeOp : LLVM_Op<"invoke", [
664- AttrSizedOperandSegments,
665- DeclareOpInterfaceMethods<BranchOpInterface>,
666- DeclareOpInterfaceMethods<CallOpInterface>,
667- DeclareOpInterfaceMethods<BranchWeightOpInterface >,
668- Terminator]> {
663+ def LLVM_InvokeOp
664+ : LLVM_Op<"invoke", [ AttrSizedOperandSegments,
665+ DeclareOpInterfaceMethods<BranchOpInterface>,
666+ DeclareOpInterfaceMethods<CallOpInterface>,
667+ DeclareOpInterfaceMethods<WeightedBranchOpInterface >,
668+ Terminator]> {
669669 let arguments = (ins
670670 OptionalAttr<TypeAttrOf<LLVM_FunctionType>>:$var_callee_type,
671671 OptionalAttr<FlatSymbolRefAttr>:$callee,
@@ -734,12 +734,12 @@ def LLVM_VaArgOp : LLVM_Op<"va_arg"> {
734734// CallOp
735735//===----------------------------------------------------------------------===//
736736
737- def LLVM_CallOp : LLVM_MemAccessOpBase<"call",
738- [AttrSizedOperandSegments,
739- DeclareOpInterfaceMethods<FastmathFlagsInterface> ,
740- DeclareOpInterfaceMethods<CallOpInterface >,
741- DeclareOpInterfaceMethods<SymbolUserOpInterface >,
742- DeclareOpInterfaceMethods<BranchWeightOpInterface >]> {
737+ def LLVM_CallOp
738+ : LLVM_MemAccessOpBase<
739+ "call", [AttrSizedOperandSegments ,
740+ DeclareOpInterfaceMethods<FastmathFlagsInterface >,
741+ DeclareOpInterfaceMethods<CallOpInterface >,
742+ DeclareOpInterfaceMethods<SymbolUserOpInterface >]> {
743743 let summary = "Call to an LLVM function.";
744744 let description = [{
745745 In LLVM IR, functions may return either 0 or 1 value. LLVM IR dialect
@@ -788,21 +788,16 @@ def LLVM_CallOp : LLVM_MemAccessOpBase<"call",
788788 OptionalAttr<FlatSymbolRefAttr>:$callee,
789789 Variadic<LLVM_Type>:$callee_operands,
790790 DefaultValuedAttr<LLVM_FastmathFlagsAttr, "{}">:$fastmathFlags,
791- OptionalAttr<DenseI32ArrayAttr>:$branch_weights,
792791 DefaultValuedAttr<CConv, "CConv::C">:$CConv,
793792 DefaultValuedAttr<TailCallKind, "TailCallKind::None">:$TailCallKind,
794793 OptionalAttr<LLVM_MemoryEffectsAttr>:$memory_effects,
795- UnitAttr:$convergent,
796- UnitAttr:$no_unwind,
797- UnitAttr:$will_return,
794+ UnitAttr:$convergent, UnitAttr:$no_unwind, UnitAttr:$will_return,
798795 VariadicOfVariadic<LLVM_Type, "op_bundle_sizes">:$op_bundle_operands,
799796 DenseI32ArrayAttr:$op_bundle_sizes,
800797 OptionalAttr<ArrayAttr>:$op_bundle_tags,
801798 OptionalAttr<DictArrayAttr>:$arg_attrs,
802- OptionalAttr<DictArrayAttr>:$res_attrs,
803- UnitAttr:$no_inline,
804- UnitAttr:$always_inline,
805- UnitAttr:$inline_hint);
799+ OptionalAttr<DictArrayAttr>:$res_attrs, UnitAttr:$no_inline,
800+ UnitAttr:$always_inline, UnitAttr:$inline_hint);
806801 // Append the aliasing related attributes defined in LLVM_MemAccessOpBase.
807802 let arguments = !con(args, aliasAttrs);
808803 let results = (outs Optional<LLVM_Type>:$result);
@@ -1047,11 +1042,12 @@ def LLVM_BrOp : LLVM_TerminatorOp<"br",
10471042 LLVM_TerminatorPassthroughOpBuilder
10481043 ];
10491044}
1050- def LLVM_CondBrOp : LLVM_TerminatorOp<"cond_br",
1051- [AttrSizedOperandSegments,
1052- DeclareOpInterfaceMethods<BranchOpInterface>,
1053- DeclareOpInterfaceMethods<BranchWeightOpInterface>,
1054- Pure]> {
1045+ def LLVM_CondBrOp
1046+ : LLVM_TerminatorOp<
1047+ "cond_br", [AttrSizedOperandSegments,
1048+ DeclareOpInterfaceMethods<BranchOpInterface>,
1049+ DeclareOpInterfaceMethods<WeightedBranchOpInterface>,
1050+ Pure]> {
10551051 let arguments = (ins I1:$condition,
10561052 Variadic<LLVM_Type>:$trueDestOperands,
10571053 Variadic<LLVM_Type>:$falseDestOperands,
@@ -1136,11 +1132,12 @@ def LLVM_UnreachableOp : LLVM_TerminatorOp<"unreachable"> {
11361132 }];
11371133}
11381134
1139- def LLVM_SwitchOp : LLVM_TerminatorOp<"switch",
1140- [AttrSizedOperandSegments,
1141- DeclareOpInterfaceMethods<BranchOpInterface>,
1142- DeclareOpInterfaceMethods<BranchWeightOpInterface>,
1143- Pure]> {
1135+ def LLVM_SwitchOp
1136+ : LLVM_TerminatorOp<
1137+ "switch", [AttrSizedOperandSegments,
1138+ DeclareOpInterfaceMethods<BranchOpInterface>,
1139+ DeclareOpInterfaceMethods<WeightedBranchOpInterface>,
1140+ Pure]> {
11441141 let arguments = (ins
11451142 AnySignlessInteger:$value,
11461143 Variadic<AnyType>:$defaultOperands,
0 commit comments