diff options
author | Jeremy Furtek <jfurtek@nvidia.com> | 2022-10-17 11:16:38 -0700 |
---|---|---|
committer | Slava Zakharin <szakharin@nvidia.com> | 2022-10-17 13:57:36 -0700 |
commit | f6ee194b68e0731f29d7217749f75769e95947ac (patch) | |
tree | 9270923a7a471fc2b30cb79bfbca2627b38b3806 /lldb/source/Commands/CommandObjectTarget.cpp | |
parent | 2b32e4f98b4f0e9e6a7c301b627ff75d9af8699e (diff) | |
download | llvm-f6ee194b68e0731f29d7217749f75769e95947ac.zip llvm-f6ee194b68e0731f29d7217749f75769e95947ac.tar.gz llvm-f6ee194b68e0731f29d7217749f75769e95947ac.tar.bz2 |
[mlir][ods] Do not print default-valued attributes when the value is equal to the default
This diff causes the `tblgen`-erated print() function to skip printing a
`DefaultValuedAttr` attribute when the value is equal to the default.
This feature will reduce the amount of custom printing code that needs to be
written by users a relatively common scenario. As a motivating example, for the
fastmath flags in the LLVMIR dialect, we would prefer to print this:
```
%0 = llvm.fadd %arg0, %arg1 : f32
```
instead of this:
```
%0 = llvm.fadd %arg0, %arg1 {fastmathFlags = #llvm.fastmath<none>} : f32
```
This diff makes the handling of print functionality for default-valued attributes
standard.
This is an updated version of https://reviews.llvm.org/D135398, without the per-attribute bit to control printing.
Reviewed By: Mogball
Differential Revision: https://reviews.llvm.org/D135993
Diffstat (limited to 'lldb/source/Commands/CommandObjectTarget.cpp')
0 files changed, 0 insertions, 0 deletions