Skip to content

[mlir][emitc] Fix EmitC dialect's operations' descriptions #101523

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 1, 2024
Merged
Changes from all commits
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
80 changes: 40 additions & 40 deletions mlir/include/mlir/Dialect/EmitC/IR/EmitC.td
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def FloatIntegerIndexOrOpaqueType : AnyTypeOf<[EmitCFloatType, IntegerIndexOrOpa
def EmitC_AddOp : EmitC_BinaryOp<"add", [CExpression]> {
let summary = "Addition operation";
let description = [{
With the `add` operation the arithmetic operator + (addition) can
With the `emitc.add` operation the arithmetic operator + (addition) can
be applied.

Example:
Expand All @@ -81,7 +81,7 @@ def EmitC_AddOp : EmitC_BinaryOp<"add", [CExpression]> {
def EmitC_ApplyOp : EmitC_Op<"apply", [CExpression]> {
let summary = "Apply operation";
let description = [{
With the `apply` operation the operators & (address of) and * (contents of)
With the `emitc.apply` operation the operators & (address of) and * (contents of)
can be applied to a single operand.

Example:
Expand Down Expand Up @@ -110,7 +110,7 @@ def EmitC_ApplyOp : EmitC_Op<"apply", [CExpression]> {
def EmitC_BitwiseAndOp : EmitC_BinaryOp<"bitwise_and", [CExpression]> {
let summary = "Bitwise and operation";
let description = [{
With the `bitwise_and` operation the bitwise operator & (and) can
With the `emitc.bitwise_and` operation the bitwise operator & (and) can
be applied.

Example:
Expand All @@ -129,7 +129,7 @@ def EmitC_BitwiseLeftShiftOp : EmitC_BinaryOp<"bitwise_left_shift",
[CExpression]> {
let summary = "Bitwise left shift operation";
let description = [{
With the `bitwise_left_shift` operation the bitwise operator <<
With the `emitc.bitwise_left_shift` operation the bitwise operator <<
(left shift) can be applied.

Example:
Expand All @@ -147,7 +147,7 @@ def EmitC_BitwiseLeftShiftOp : EmitC_BinaryOp<"bitwise_left_shift",
def EmitC_BitwiseNotOp : EmitC_UnaryOp<"bitwise_not", [CExpression]> {
let summary = "Bitwise not operation";
let description = [{
With the `bitwise_not` operation the bitwise operator ~ (not) can
With the `emitc.bitwise_not` operation the bitwise operator ~ (not) can
be applied.

Example:
Expand All @@ -165,7 +165,7 @@ def EmitC_BitwiseNotOp : EmitC_UnaryOp<"bitwise_not", [CExpression]> {
def EmitC_BitwiseOrOp : EmitC_BinaryOp<"bitwise_or", [CExpression]> {
let summary = "Bitwise or operation";
let description = [{
With the `bitwise_or` operation the bitwise operator | (or)
With the `emitc.bitwise_or` operation the bitwise operator | (or)
can be applied.

Example:
Expand All @@ -184,7 +184,7 @@ def EmitC_BitwiseRightShiftOp : EmitC_BinaryOp<"bitwise_right_shift",
[CExpression]> {
let summary = "Bitwise right shift operation";
let description = [{
With the `bitwise_right_shift` operation the bitwise operator >>
With the `emitc.bitwise_right_shift` operation the bitwise operator >>
(right shift) can be applied.

Example:
Expand All @@ -202,7 +202,7 @@ def EmitC_BitwiseRightShiftOp : EmitC_BinaryOp<"bitwise_right_shift",
def EmitC_BitwiseXorOp : EmitC_BinaryOp<"bitwise_xor", [CExpression]> {
let summary = "Bitwise xor operation";
let description = [{
With the `bitwise_xor` operation the bitwise operator ^ (xor)
With the `emitc.bitwise_xor` operation the bitwise operator ^ (xor)
can be applied.

Example:
Expand All @@ -220,7 +220,7 @@ def EmitC_BitwiseXorOp : EmitC_BinaryOp<"bitwise_xor", [CExpression]> {
def EmitC_CallOpaqueOp : EmitC_Op<"call_opaque", [CExpression]> {
let summary = "Opaque call operation";
let description = [{
The `call_opaque` operation represents a C++ function call. The callee
The `emitc.call_opaque` operation represents a C++ function call. The callee
can be an arbitrary non-empty string. The call allows specifying order
of operands and attributes in the call as follows:

Expand Down Expand Up @@ -269,7 +269,7 @@ def EmitC_CastOp : EmitC_Op<"cast",
SameOperandsAndResultShape]> {
let summary = "Cast operation";
let description = [{
The `cast` operation performs an explicit type conversion and is emitted
The `emitc.cast` operation performs an explicit type conversion and is emitted
as a C-style cast expression. It can be applied to integer, float, index
and EmitC types.

Expand All @@ -293,7 +293,7 @@ def EmitC_CastOp : EmitC_Op<"cast",
def EmitC_CmpOp : EmitC_BinaryOp<"cmp", [CExpression]> {
let summary = "Comparison operation";
let description = [{
With the `cmp` operation the comparison operators ==, !=, <, <=, >, >=, <=>
With the `emitc.cmp` operation the comparison operators ==, !=, <, <=, >, >=, <=>
can be applied.

Its first argument is an attribute that defines the comparison operator:
Expand Down Expand Up @@ -334,10 +334,10 @@ def EmitC_CmpOp : EmitC_BinaryOp<"cmp", [CExpression]> {
def EmitC_ConstantOp : EmitC_Op<"constant", [ConstantLike]> {
let summary = "Constant operation";
let description = [{
The `constant` operation produces an SSA value equal to some constant
The `emitc.constant` operation produces an SSA value equal to some constant
specified by an attribute. This can be used to form simple integer and
floating point constants, as well as more exotic things like tensor
constants. The `constant` operation also supports the EmitC opaque
constants. The `emitc.constant` operation also supports the EmitC opaque
attribute and the EmitC opaque type. Since folding is supported,
it should not be used with pointers.

Expand All @@ -363,7 +363,7 @@ def EmitC_ConstantOp : EmitC_Op<"constant", [ConstantLike]> {
def EmitC_DivOp : EmitC_BinaryOp<"div", [CExpression]> {
let summary = "Division operation";
let description = [{
With the `div` operation the arithmetic operator / (division) can
With the `emitc.div` operation the arithmetic operator / (division) can
be applied.

Example:
Expand All @@ -389,7 +389,7 @@ def EmitC_ExpressionOp : EmitC_Op<"expression",
NoRegionArguments]> {
let summary = "Expression operation";
let description = [{
The `expression` operation returns a single SSA value which is yielded by
The `emitc.expression` operation returns a single SSA value which is yielded by
its single-basic-block region. The operation doesn't take any arguments.

As the operation is to be emitted as a C expression, the operations within
Expand Down Expand Up @@ -593,8 +593,8 @@ def EmitC_DeclareFuncOp : EmitC_Op<"declare_func", [
]> {
let summary = "An operation to declare a function";
let description = [{
The `declare_func` operation allows to insert a function declaration for an
`emitc.func` at a specific position. The operation only requires the `callee`
The `emitc.declare_func` operation allows to insert a function declaration for an
`emitc.func` at a specific position. The operation only requires the "callee"
of the `emitc.func` to be specified as an attribute.

Example:
Expand Down Expand Up @@ -733,7 +733,7 @@ def EmitC_IncludeOp
: EmitC_Op<"include", [HasParent<"ModuleOp">]> {
let summary = "Include operation";
let description = [{
The `include` operation allows to define a source file inclusion via the
The `emitc.include` operation allows to define a source file inclusion via the
`#include` directive.

Example:
Expand Down Expand Up @@ -762,7 +762,7 @@ def EmitC_IncludeOp
def EmitC_LiteralOp : EmitC_Op<"literal", [Pure]> {
let summary = "Literal operation";
let description = [{
The `literal` operation produces an SSA value equal to some constant
The `emitc.literal` operation produces an SSA value equal to some constant
specified by an attribute.
}];

Expand All @@ -776,7 +776,7 @@ def EmitC_LiteralOp : EmitC_Op<"literal", [Pure]> {
def EmitC_LogicalAndOp : EmitC_BinaryOp<"logical_and", [CExpression]> {
let summary = "Logical and operation";
let description = [{
With the `logical_and` operation the logical operator && (and) can
With the `emitc.logical_and` operation the logical operator && (and) can
be applied.

Example:
Expand All @@ -797,7 +797,7 @@ def EmitC_LogicalAndOp : EmitC_BinaryOp<"logical_and", [CExpression]> {
def EmitC_LogicalNotOp : EmitC_UnaryOp<"logical_not", [CExpression]> {
let summary = "Logical not operation";
let description = [{
With the `logical_not` operation the logical operator ! (negation) can
With the `emitc.logical_not` operation the logical operator ! (negation) can
be applied.

Example:
Expand All @@ -818,7 +818,7 @@ def EmitC_LogicalNotOp : EmitC_UnaryOp<"logical_not", [CExpression]> {
def EmitC_LogicalOrOp : EmitC_BinaryOp<"logical_or", [CExpression]> {
let summary = "Logical or operation";
let description = [{
With the `logical_or` operation the logical operator || (inclusive or)
With the `emitc.logical_or` operation the logical operator || (inclusive or)
can be applied.

Example:
Expand All @@ -839,7 +839,7 @@ def EmitC_LogicalOrOp : EmitC_BinaryOp<"logical_or", [CExpression]> {
def EmitC_MulOp : EmitC_BinaryOp<"mul", [CExpression]> {
let summary = "Multiplication operation";
let description = [{
With the `mul` operation the arithmetic operator * (multiplication) can
With the `emitc.mul` operation the arithmetic operator * (multiplication) can
be applied.

Example:
Expand All @@ -863,7 +863,7 @@ def EmitC_MulOp : EmitC_BinaryOp<"mul", [CExpression]> {
def EmitC_RemOp : EmitC_BinaryOp<"rem", [CExpression]> {
let summary = "Remainder operation";
let description = [{
With the `rem` operation the arithmetic operator % (remainder) can
With the `emitc.rem` operation the arithmetic operator % (remainder) can
be applied.

Example:
Expand All @@ -885,7 +885,7 @@ def EmitC_RemOp : EmitC_BinaryOp<"rem", [CExpression]> {
def EmitC_SubOp : EmitC_BinaryOp<"sub", [CExpression]> {
let summary = "Subtraction operation";
let description = [{
With the `sub` operation the arithmetic operator - (subtraction) can
With the `emitc.sub` operation the arithmetic operator - (subtraction) can
be applied.

Example:
Expand All @@ -911,7 +911,7 @@ def EmitC_SubOp : EmitC_BinaryOp<"sub", [CExpression]> {
def EmitC_MemberOp : EmitC_Op<"member"> {
let summary = "Member operation";
let description = [{
With the `member` operation the member access operator `.` can be
With the `emitc.member` operation the member access operator `.` can be
applied.

Example:
Expand All @@ -932,7 +932,7 @@ def EmitC_MemberOp : EmitC_Op<"member"> {
def EmitC_MemberOfPtrOp : EmitC_Op<"member_of_ptr"> {
let summary = "Member of pointer operation";
let description = [{
With the `member_of_ptr` operation the member access operator `->`
With the `emitc.member_of_ptr` operation the member access operator `->`
can be applied.

Example:
Expand All @@ -954,7 +954,7 @@ def EmitC_ConditionalOp : EmitC_Op<"conditional",
[AllTypesMatch<["true_value", "false_value", "result"]>, CExpression]> {
let summary = "Conditional (ternary) operation";
let description = [{
With the `conditional` operation the ternary conditional operator can
With the `emitc.conditional` operation the ternary conditional operator can
be applied.

Example:
Expand Down Expand Up @@ -983,7 +983,7 @@ def EmitC_ConditionalOp : EmitC_Op<"conditional",
def EmitC_UnaryMinusOp : EmitC_UnaryOp<"unary_minus", [CExpression]> {
let summary = "Unary minus operation";
let description = [{
With the `unary_minus` operation the unary operator - (minus) can be
With the `emitc.unary_minus` operation the unary operator - (minus) can be
applied.

Example:
Expand All @@ -1001,7 +1001,7 @@ def EmitC_UnaryMinusOp : EmitC_UnaryOp<"unary_minus", [CExpression]> {
def EmitC_UnaryPlusOp : EmitC_UnaryOp<"unary_plus", [CExpression]> {
let summary = "Unary plus operation";
let description = [{
With the `unary_plus` operation the unary operator + (plus) can be
With the `emitc.unary_plus` operation the unary operator + (plus) can be
applied.

Example:
Expand All @@ -1019,13 +1019,13 @@ def EmitC_UnaryPlusOp : EmitC_UnaryOp<"unary_plus", [CExpression]> {
def EmitC_VariableOp : EmitC_Op<"variable", []> {
let summary = "Variable operation";
let description = [{
The `variable` operation produces an SSA value equal to some value
The `emitc.variable` operation produces an SSA value equal to some value
specified by an attribute. This can be used to form simple integer and
floating point variables, as well as more exotic things like tensor
variables. The `variable` operation also supports the EmitC opaque
variables. The `emitc.variable` operation also supports the EmitC opaque
attribute and the EmitC opaque type. If further supports the EmitC
pointer type, whereas folding is not supported.
The `variable` is emitted as a C/C++ local variable.
The `emitc.variable` is emitted as a C/C++ local variable.

Example:

Expand Down Expand Up @@ -1129,7 +1129,7 @@ def EmitC_GetGlobalOp : EmitC_Op<"get_global",
def EmitC_VerbatimOp : EmitC_Op<"verbatim"> {
let summary = "Verbatim operation";
let description = [{
The `verbatim` operation produces no results and the value is emitted as is
The `emitc.verbatim` operation produces no results and the value is emitted as is
followed by a line break ('\n' character) during translation.

Note: Use with caution. This operation can have arbitrary effects on the
Expand Down Expand Up @@ -1163,7 +1163,7 @@ def EmitC_VerbatimOp : EmitC_Op<"verbatim"> {
def EmitC_AssignOp : EmitC_Op<"assign", []> {
let summary = "Assign operation";
let description = [{
The `assign` operation stores an SSA value to the location designated by an
The `emitc.assign` operation stores an SSA value to the location designated by an
EmitC variable. This operation doesn't return any value. The assigned value
must be of the same type as the variable being assigned. The operation is
emitted as a C/C++ '=' operator.
Expand Down Expand Up @@ -1191,11 +1191,11 @@ def EmitC_YieldOp : EmitC_Op<"yield",
[Pure, Terminator, ParentOneOf<["ExpressionOp", "IfOp", "ForOp"]>]> {
let summary = "block termination operation";
let description = [{
"yield" terminates its parent EmitC op's region, optionally yielding
The `emitc.yield` terminates its parent EmitC op's region, optionally yielding
an SSA value. The semantics of how the values are yielded is defined by the
parent operation.
If "yield" has an operand, the operand must match the parent operation's
result. If the parent operation defines no values, then the "emitc.yield"
If `emitc.yield` has an operand, the operand must match the parent operation's
result. If the parent operation defines no values, then the `emitc.yield`
may be left out in the custom syntax and the builders will insert one
implicitly. Otherwise, it has to be present in the syntax to indicate which
value is yielded.
Expand All @@ -1216,7 +1216,7 @@ def EmitC_IfOp : EmitC_Op<"if",
RecursiveMemoryEffects, NoRegionArguments]> {
let summary = "if-then-else operation";
let description = [{
The `if` operation represents an if-then-else construct for
The `emitc.if` operation represents an if-then-else construct for
conditionally executing two regions of code. The operand to an if operation
is a boolean value. For example:

Expand Down Expand Up @@ -1268,7 +1268,7 @@ def EmitC_IfOp : EmitC_Op<"if",
def EmitC_SubscriptOp : EmitC_Op<"subscript", []> {
let summary = "Subscript operation";
let description = [{
With the `subscript` operation the subscript operator `[]` can be applied
With the `emitc.subscript` operation the subscript operator `[]` can be applied
to variables or arguments of array, pointer and opaque type.

Example:
Expand Down
Loading