aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/StackFrameLayoutAnalysisPass.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2025-10-03 23:46:51 -0700
committerGitHub <noreply@github.com>2025-10-03 23:46:51 -0700
commit30f7c5d04c395e766bd778acfa46ee88e2ad300d (patch)
treead5332e31653285792971d32fae18149dda3a2ec /llvm/lib/CodeGen/StackFrameLayoutAnalysisPass.cpp
parentcd32b9b6c3b2fda3a781d9ce0a0cf8e21c9d0137 (diff)
downloadllvm-30f7c5d04c395e766bd778acfa46ee88e2ad300d.zip
llvm-30f7c5d04c395e766bd778acfa46ee88e2ad300d.tar.gz
llvm-30f7c5d04c395e766bd778acfa46ee88e2ad300d.tar.bz2
[ADT] Add bit_width_constexpr (#161775)
This patch adds llvm::bit_width_constexpr, a constexpr version of llvm::bit_width. The new function is intended to serve as a marker. When we switch to C++20, we will most likely go through functions in llvm/ADT/bit.h and replace them with their counterparts from <bit>. With llvm::bit_width_constexpr, we can easily replace its use with std::bit_width. This patch refactors a couple of places. Specifically: - bitWidth in BitmaskEnum.h is replaced with the new function. - bitsRequired in PointerUnion.h is redefined in terms of the new function. I've used Compiler Explorer to check the equivalence: https://godbolt.org/z/1oKMK9Ez7
Diffstat (limited to 'llvm/lib/CodeGen/StackFrameLayoutAnalysisPass.cpp')
0 files changed, 0 insertions, 0 deletions