Skip to content
Commit da4d191f authored by TatWai Chong's avatar TatWai Chong Committed by Eric Kunze
Browse files

[mlir][tosa] operation printing syntax prettification

The initial patch defines the printing format of tosa operations in
declarative and C++ manners to make alignment against more readable
syntax in other dialects. The general change to assembly output is
shown below.

from
     %out = "tosa.op"(%input1, %input2, ...) : (type1, type2, ...) -> (out_type)
to
     %out = tosa.op %input1, %input2, ... : (type1, type2, ...) -> out_type

There is a significant structural printing change to tosa control-flow
operations, `cond_if` and `while_loop`, aiming to provide more concise
and intuitive syntax. Note that we leave tosa.const unchanged. As this
op can be attached with quantization information, may need more tweaks
to distinguish plain integer type from quantized type for printing the
value in a concise form.

Differential Revision: https://reviews.llvm.org/D155231
parent 7a2dfe22
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment