[PATCH] D23035: [Support] Add LLVM_BITFIELD_WIDTH and LLVM_CHECKED_BITFIELD_ASSIGN macros.

Justin Lebar via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 1 20:27:11 PDT 2016


jlebar added a comment.

> An option would be simply to get rid of the range checks in SelectionDAG, under the assumption that, if you add a value to one of these enums and then use it in SelectionDAG, hopefully you have a test that fails.


In fact, we could even static_assert that e.g. ISD::LAST_LOADEXT_TYPE is <= 2**field_width.

One problem with this is we'd need to define a max field on AtomicOrdering.


https://reviews.llvm.org/D23035





More information about the llvm-commits mailing list