aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/CodeGen.cpp
diff options
context:
space:
mode:
authorKrzysztof Drewniak <krzysdrewniak@gmail.com>2025-04-13 22:46:57 -0500
committerGitHub <noreply@github.com>2025-04-13 22:46:57 -0500
commit5ecc0ef6b01fe9dcca8fcaa8b306cd94c2239db4 (patch)
tree3e8b150c5d4ae8527a460534aa85c14bef7cfcac /llvm/lib/CodeGen/CodeGen.cpp
parente038c5401c99ca1f19a873a5c88ad7db4645a26a (diff)
downloadllvm-5ecc0ef6b01fe9dcca8fcaa8b306cd94c2239db4.zip
llvm-5ecc0ef6b01fe9dcca8fcaa8b306cd94c2239db4.tar.gz
llvm-5ecc0ef6b01fe9dcca8fcaa8b306cd94c2239db4.tar.bz2
[mlir] Improve EnumProp, making it take an EnumInfo (#132349)
This commit improves the `EnumProp` class, causing it to wrap around an `EnumInfo` just like` EnumAttr` does. This EnumProp also has logic for converting to/from an integer attribute and for being read and written as bitcode. The following variants of `EnumProp` are provided: - `EnumPropWithAttrForm` - an EnumProp that can be constructed from (and will be converted to, if `storeInCustomAttribute` is true) a custom attribute, like an `EnumAttr`, instead of a plain integer. This is meant for backwards compatibility with code that uses enum attributes. `NamedEnumProp` adds a "`mnemonic` `<` $enum `>`" syntax around the enum, replicating a common pattern seen in MLIR printers and allowing for reduced ambiguity. `NamedEnumPropWithAttrForm` combines both of these extensions. (Sadly, bytecode auto-upgrade is hampered by the lack of the ability to optionally parse an attribute.) Depends on #132148
Diffstat (limited to 'llvm/lib/CodeGen/CodeGen.cpp')
0 files changed, 0 insertions, 0 deletions