[PATCH] D159242: [InlineAsm] wrap Kind in enum class NFC
Nick Desaulniers via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 30 17:03:17 PDT 2023
nickdesaulniers created this revision.
Herald added subscribers: pengfei, Jim, jrtc27, fedor.sergeev, kbarton, hiraditya, nemanjai, dylanmckay, jyknight.
Herald added a project: All.
nickdesaulniers requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Should add some minor type safety to the use of this information, since
there's quite a bit of metadata being laundered through an `unsigned`.
I'm looking to potentially add more bitfields to that `unsigned`, but I
find InlineAsm's big ol' bag of enum values and usage of `unsigned`
confusing, type-unsafe, and un-ergonomic. These can probably be better
abstracted.
I think the lack of static_cast outside of InlineAsm indicates the prior
code smell fixed here.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D159242
Files:
llvm/include/llvm/IR/InlineAsm.h
llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
llvm/lib/CodeGen/GlobalISel/InlineAsmLowering.cpp
llvm/lib/CodeGen/MachineInstr.cpp
llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
llvm/lib/CodeGen/TargetInstrInfo.cpp
llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp
llvm/lib/Target/AVR/AVRISelLowering.cpp
llvm/lib/Target/CSKY/CSKYISelDAGToDAG.cpp
llvm/lib/Target/Hexagon/HexagonISelLowering.cpp
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp
llvm/lib/Target/X86/X86FloatingPoint.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D159242.554865.patch
Type: text/x-patch
Size: 33181 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230831/8f6e6061/attachment.bin>
More information about the llvm-commits
mailing list