diff options
author | Peng Liu <winner245@hotmail.com> | 2025-03-26 12:02:03 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-26 12:02:03 -0400 |
commit | 649cbcc3764c554c9c9839f021d073fa9a9f0515 (patch) | |
tree | f7292da24d24f206225b34bda039936fa3be4cf9 /flang/lib/Frontend/CompilerInvocation.cpp | |
parent | ac8e18cdcecbef0c1e5080aec4ad655f61b1a249 (diff) | |
download | llvm-649cbcc3764c554c9c9839f021d073fa9a9f0515.zip llvm-649cbcc3764c554c9c9839f021d073fa9a9f0515.tar.gz llvm-649cbcc3764c554c9c9839f021d073fa9a9f0515.tar.bz2 |
[libc++] Remove unnecessary division and modulo operations in bitset (#121312)
The PR removes the unnecessary division and modulo operations in the
one-word specialization `__bitset<1, _Size>`. The reason is that for the
one-word specialization, we have `__pos < __bits_per_word` (as
`__bitset<1, _Size>` is an implementation detail only used by the public
`bitset`). So `__pos / __bits_per_word == 0` and `__pos / __pos %
__bits_per_word == __pos`.
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions