[Mlir-commits] [mlir] 7c7882f - [mlir][llvmir] fix docs (#71765)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Nov 8 23:00:07 PST 2023
Author: Maksim Levental
Date: 2023-11-09T01:00:03-06:00
New Revision: 7c7882fcffbfd204f95a3613ce076abf7da294e8
URL: https://github.com/llvm/llvm-project/commit/7c7882fcffbfd204f95a3613ce076abf7da294e8
DIFF: https://github.com/llvm/llvm-project/commit/7c7882fcffbfd204f95a3613ce076abf7da294e8.diff
LOG: [mlir][llvmir] fix docs (#71765)
Added:
Modified:
mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
Removed:
################################################################################
diff --git a/mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td b/mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
index 7928bb940ad8bae..ffb79a196db28ad 100644
--- a/mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
+++ b/mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
@@ -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
-
diff ers 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
diff ers from the LLVM function type that uses a explicit
+ void type to model functions that do not return a value.
Examples:
@@ -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.
More information about the Mlir-commits
mailing list