[all-commits] [llvm/llvm-project] 745890: [libc++] Improve binary size when using __transaction
philnik777 via All-commits
all-commits at lists.llvm.org
Sun Jan 22 19:57:47 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 7458908f12da37e90262bdfaf753d15fb07006e7
https://github.com/llvm/llvm-project/commit/7458908f12da37e90262bdfaf753d15fb07006e7
Author: Nikolas Klauser <nikolasklauser at berlin.de>
Date: 2023-01-23 (Mon, 23 Jan 2023)
Changed paths:
M libcxx/include/CMakeLists.txt
M libcxx/include/__expected/expected.h
M libcxx/include/__memory/uninitialized_algorithms.h
M libcxx/include/__memory_resource/polymorphic_allocator.h
A libcxx/include/__utility/exception_guard.h
R libcxx/include/__utility/transaction.h
M libcxx/include/module.modulemap.in
M libcxx/include/utility
M libcxx/include/vector
M libcxx/test/libcxx/private_headers.verify.cpp
A libcxx/test/libcxx/utilities/assert.exception_guard.no_exceptions.pass.cpp
A libcxx/test/libcxx/utilities/exception_guard.no_exceptions.pass.cpp
A libcxx/test/libcxx/utilities/exception_guard.pass.cpp
R libcxx/test/libcxx/utilities/transaction.pass.cpp
Log Message:
-----------
[libc++] Improve binary size when using __transaction
__exception_guard is a no-op in -fno-exceptions mode to produce better code-gen. This means that we don't provide the strong exception guarantees. However, Clang doesn't generate cleanup code with exceptions disabled, so even if we wanted to provide the strong exception guarantees we couldn't. This is also only relevant for constructs with a stack of -fexceptions > -fno-exceptions > -fexceptions code, since the exception can't be caught where exceptions are disabled. While -fexceptions > -fno-exceptions is quite common (e.g. libc++.dylib > -fno-exceptions), having another layer with exceptions enabled seems a lot less common, especially one that tries to catch an exception through -fno-exceptions code.
Fixes https://github.com/llvm/llvm-project/issues/56783
Reviewed By: ldionne, Mordante, huixie90, #libc
Spies: EricWF, alexfh, hans, joanahalili, libcxx-commits
Differential Revision: https://reviews.llvm.org/D133661
More information about the All-commits
mailing list