[PATCH] D124805: [DirectX backend] Add pass to lower llvm intrinsic into dxil op function.
Jakub Kuderski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 10 10:01:21 PDT 2022
kuhar added inline comments.
================
Comment at: llvm/lib/Target/DirectX/DXILOpLowering.cpp:33
+
+enum OverloadKind : uint16_t {
+ VOID = 1,
----------------
python3kgae wrote:
> kuhar wrote:
> > nit: prefer `enum class`
> enum class will require cast on case like OverloadKind::FLOAT | OverloadKind::HALF.
> I prefer not to have
> (uint16_t)OverloadKind::FLOAT | (uint16_t)OverloadKind::HALF.
>
> Is it OK to keep it without enum class?
There are 3 options:
1. Keep the code as-is
2. Add `enum class` and cast manually
3. Add `enum class` and overload the operators you need and do the casting inside.
I think both 1 and 3 are fine. 1 is less code and this enum is not in a header, so I'd be leaning towards keeping this as-is.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124805/new/
https://reviews.llvm.org/D124805
More information about the llvm-commits
mailing list