We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 850b492 commit 11fdeadCopy full SHA for 11fdead
mlir/include/mlir/Dialect/EmitC/IR/EmitC.td
@@ -844,6 +844,17 @@ def EmitC_LiteralOp : EmitC_Op<"literal", [Pure]> {
844
let description = [{
845
The `emitc.literal` operation produces an SSA value equal to some constant
846
specified by an attribute.
847
+
848
+ Example:
849
850
+ ```mlir
851
+ %p0 = emitc.literal "M_PI" : f32
852
+ %1 = "emitc.add" (%arg0, %p0) : (f32, f32) -> f32
853
+ ```
854
+ ```c++
855
+ // Code emitted for the operation above.
856
+ float v2 = v1 + M_PI;
857
858
}];
859
860
let arguments = (ins StrAttr:$value);
0 commit comments