Loading mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td +7 −5 Original line number Diff line number Diff line Loading @@ -572,11 +572,12 @@ def LLVM_CallOp : LLVM_MemAccessOpBase<"call", The `call` instruction supports both direct and indirect calls. Direct calls start with a function name (`@`-prefixed) and indirect calls start with an SSA value (`%`-prefixed). The direct callee, if present, is stored as a function attribute `callee`. If the callee is a variadic function, then the `callee_type` attribute must carry the function type. The trailing type list contains the optional indirect callee type and the MLIR function type, which differs from the LLVM function type that uses a explicit void type to model functions that do not return a value. function attribute `callee`. For indirect calls, the callee is of `!llvm.ptr` type and is stored as the first value in `callee_operands`. If the callee is a variadic function, then the `callee_type` attribute must carry the function type. The trailing type list contains the optional indirect callee type and the MLIR function type, which differs from the LLVM function type that uses a explicit void type to model functions that do not return a value. Examples: Loading @@ -588,6 +589,7 @@ def LLVM_CallOp : LLVM_MemAccessOpBase<"call", llvm.call @bar(%0) : (f32) -> () // Indirect call with an argument and without a result. %1 = llvm.mlir.addressof @foo : !llvm.ptr llvm.call %1(%0) : !llvm.ptr, (f32) -> () // Direct variadic call. Loading Loading
mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td +7 −5 Original line number Diff line number Diff line Loading @@ -572,11 +572,12 @@ def LLVM_CallOp : LLVM_MemAccessOpBase<"call", The `call` instruction supports both direct and indirect calls. Direct calls start with a function name (`@`-prefixed) and indirect calls start with an SSA value (`%`-prefixed). The direct callee, if present, is stored as a function attribute `callee`. If the callee is a variadic function, then the `callee_type` attribute must carry the function type. The trailing type list contains the optional indirect callee type and the MLIR function type, which differs from the LLVM function type that uses a explicit void type to model functions that do not return a value. function attribute `callee`. For indirect calls, the callee is of `!llvm.ptr` type and is stored as the first value in `callee_operands`. If the callee is a variadic function, then the `callee_type` attribute must carry the function type. The trailing type list contains the optional indirect callee type and the MLIR function type, which differs from the LLVM function type that uses a explicit void type to model functions that do not return a value. Examples: Loading @@ -588,6 +589,7 @@ def LLVM_CallOp : LLVM_MemAccessOpBase<"call", llvm.call @bar(%0) : (f32) -> () // Indirect call with an argument and without a result. %1 = llvm.mlir.addressof @foo : !llvm.ptr llvm.call %1(%0) : !llvm.ptr, (f32) -> () // Direct variadic call. Loading