[all-commits] [llvm/llvm-project] 920d73: [CIR] Move the CIR enums off the legacy EnumAttrIn...
Henrich Lauko via All-commits
all-commits at lists.llvm.org
Mon Sep 7 01:49:31 PDT 2026
Branch: refs/heads/users/xlauko/cir-enum-10-hoist-genspecialized
Home: https://github.com/llvm/llvm-project
Commit: 920d73d96f6ba10c1c88af2f69cfa25dfcb2acfa
https://github.com/llvm/llvm-project/commit/920d73d96f6ba10c1c88af2f69cfa25dfcb2acfa
Author: Henrich Lauko <hlauko at nvidia.com>
Date: 2026-09-07 (Mon, 07 Sep 2026)
Changed paths:
M clang/include/clang/CIR/Dialect/IR/CIRAttrs.td
M clang/include/clang/CIR/Dialect/IR/CIRCUDAAttrs.td
M clang/include/clang/CIR/Dialect/IR/CIREnumAttr.td
M clang/include/clang/CIR/Dialect/IR/CIROps.td
M clang/include/clang/CIR/Dialect/IR/CIRTypes.td
M clang/test/CIR/IR/invalid-call.cir
M clang/test/CIR/IR/invalid-lang-attr.cir
Log Message:
-----------
[CIR] Move the CIR enums off the legacy EnumAttrInfo hierarchy
MLIR has two enum hierarchies. `EnumAttrInfo` doubles as an `IntegerAttr`
constraint, so every CIR enum had to clear `genSpecializedAttr` to say it did
not want one. `EnumInfo` describes a C++ enum and nothing more.
Derive the CIR bases from `I32Enum`, `I64Enum` and `I32BitEnum`, and widen
`CIR_EnumAttr` to the `EnumInfo` that upstream `EnumAttr` already takes. The
flag no longer exists to clear. `FPClassTestEnum` gets unquoted printing from
`BitEnumBase` rather than overriding `printBitEnumQuoted`, and
`CIR_KnownFuncKind` drops a `parameterPrinter` the generated `operator<<`
now covers, still spelling `#cir.func_identity<"std::find">`.
AMDGPU wraps an `I32Enum` in an `EnumAttr` with this same bracketed format.
Parsing moves to the generated `FieldParser`, whose diagnostic names the
accepted spellings, so two `expected-error` lines change. Generated attribute
code drops 16 KB as 28 inlined parsers collapse into it.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list