This allows optimization without LTO.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
I don't think we should use if constexpr if we don't actually require it's semantics. A normal if will get optimized just fine. The only actual change here is that the llvm_is_multithreaded() definition gets moved into the header, which allows this to optimize without LTO.
llvm/include/llvm/Support/Mutex.h | ||
---|---|---|
28 | There is also SmartRWMutex in RWMutex.h. |
Removing the else-after-ifs seems fine to me.
llvm/include/llvm/Support/Mutex.h | ||
---|---|---|
36–37 | run git clang-format main |
llvm/include/llvm/Support/Mutex.h | ||
---|---|---|
36–37 |
I have already formatted the patch via git clang-format HEAD~1. What's wrong with it? |
llvm/include/llvm/Support/Mutex.h | ||
---|---|---|
48–49 | Still holds |
llvm/include/llvm/Support/Mutex.h | ||
---|---|---|
48–49 | Never mind, compared wrong revisions |
There is also SmartRWMutex in RWMutex.h.