Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions mlir/include/mlir/Dialect/EmitC/IR/EmitC.td
Original file line number Diff line number Diff line change
Expand Up @@ -798,6 +798,19 @@ def EmitC_LiteralOp : EmitC_Op<"literal", [Pure]> {
let description = [{
The `emitc.literal` operation produces an SSA value equal to some constant
specified by an attribute.

Example:

```mlir
%x = "emitc.variable"() <{value = #emitc.opaque<"">}> : () -> !emitc.lvalue<i32>
%one = literal "1" : i32
"emitc.assign"(%x, %one) : (!emitc.lvalue<i32>, i32) -> ()
```
```c++
// Code emitted for the operation above.
int32_t v1;
v1 = 1;
```
}];

let arguments = (ins StrAttr:$value);
Expand Down