[Mlir-commits] [mlir] [mlir][emitc][NFC] Add type clarification to the description for the emitc.global op (PR #127997)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu Feb 20 04:17:37 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir
Author: Andrey Timonin (EtoAndruwa)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/127997.diff
1 Files Affected:
- (modified) mlir/include/mlir/Dialect/EmitC/IR/EmitC.td (+4-2)
``````````diff
diff --git a/mlir/include/mlir/Dialect/EmitC/IR/EmitC.td b/mlir/include/mlir/Dialect/EmitC/IR/EmitC.td
index 4fbce995ce5b8..e7a76e808e6c6 100644
--- a/mlir/include/mlir/Dialect/EmitC/IR/EmitC.td
+++ b/mlir/include/mlir/Dialect/EmitC/IR/EmitC.td
@@ -1126,8 +1126,8 @@ def EmitC_GlobalOp : EmitC_Op<"global", [Symbol]> {
let summary = "A global variable";
let description = [{
The `emitc.global` operation declares or defines a named global variable.
- The backing memory for the variable is allocated statically and is
- described by the type of the variable.
+ The backing memory for the variable is allocated statically and described by
+ the variable's type, which must be an EmitC type.
Optionally, an `initial_value` can be provided.
Internal linkage can be specified using the `static_specifier` unit attribute
and external linkage can be specified using the `extern_specifier` unit attribute.
@@ -1147,6 +1147,8 @@ def EmitC_GlobalOp : EmitC_Op<"global", [Symbol]> {
emitc.global @x : !emitc.array<2xf32> = dense<0.0>
// Global variable with an initial values.
emitc.global @x : !emitc.array<3xi32> = dense<[0, 1, 2]>
+ // Global variable with an opaque initial value.
+ emitc.global @y : !emitc.opaque<"char"> = #emitc.opaque<"CHAR_MIN">
// External global variable
emitc.global extern @x : !emitc.array<2xf32>
// Constant global variable with internal linkage
``````````
</details>
https://github.com/llvm/llvm-project/pull/127997
More information about the Mlir-commits
mailing list