This diff introduces a tablegen field for bit enum attributes
(printBitEnumPrimaryGroups) to control printing when the enum uses "group"
cases. An example would be an implementation that uses a fastmath enum value
as an alias for individual fastmath flags. The proposed field would allow
printing of simply fast for the enum value, instead of the more verbose list
that would include fast as well as the individual flags (e.g. `reassoc,nnan,
ninf,nsz,arcp,contract,afn,fast`).
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/tools/mlir-tblgen/EnumsGen.cpp | ||
---|---|---|
191 | Can you document these? | |
192–193 | Please format these as you would if you wrote it directly(e.g. proper newlines, formatting, etc.) We want the generated code to be in the same form as hand written code (when possible). | |
195 | Can you drop the braces here? | |
212 | Can you just use llvm::reverse here? | |
223 | Drop the trivial braces here. | |
mlir/unittests/TableGen/enums.td | ||
52–60 | Can you reduce the number of lines here? This style feels different from the rest of the file. |
- Correct formatting, add comments, use llvm::reverse()
- Make formatting code more readable
- Properly punctuate comments.
Can you document these?