[all-commits] [llvm/llvm-project] 278fd0: [Clang] Mark this pointer in destructors dead_on_r...
Aiden Grossman via All-commits
all-commits at lists.llvm.org
Fri Feb 6 14:29:51 PST 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 278fd0553ef5834e005a048a6b480631f3fc1b38
https://github.com/llvm/llvm-project/commit/278fd0553ef5834e005a048a6b480631f3fc1b38
Author: Aiden Grossman <aidengrossman at google.com>
Date: 2026-02-06 (Fri, 06 Feb 2026)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/include/clang/Basic/CodeGenOptions.def
M clang/include/clang/Options/Options.td
M clang/lib/CodeGen/CGCall.cpp
M clang/lib/Driver/ToolChains/Clang.cpp
M clang/test/CodeGen/paren-list-agg-init.cpp
M clang/test/CodeGenCXX/amdgcn-automatic-variable.cpp
M clang/test/CodeGenCXX/amdgcn-func-arg.cpp
M clang/test/CodeGenCXX/control-flow-in-stmt-expr.cpp
M clang/test/CodeGenCXX/cxx2a-destroying-delete.cpp
A clang/test/CodeGenCXX/destructor-dead-on-return.cpp
M clang/test/CodeGenCXX/microsoft-vector-deleting-dtors.cpp
M clang/test/CodeGenCXX/microsoft-vector-deleting-dtors2.cpp
M clang/test/CodeGenCXX/ptrauth-apple-kext-indirect-virtual-dtor-call.cpp
M clang/test/CodeGenObjCXX/objc-struct-cxx-abi.mm
M clang/test/CodeGenObjCXX/ptrauth-struct-cxx-abi.mm
M clang/test/DebugInfo/CXX/bpf-structors.cpp
M clang/test/DebugInfo/CXX/trivial_abi.cpp
M clang/test/OpenMP/amdgcn_target_global_constructor.cpp
M clang/test/OpenMP/distribute_firstprivate_codegen.cpp
M clang/test/OpenMP/distribute_lastprivate_codegen.cpp
M clang/test/OpenMP/distribute_parallel_for_firstprivate_codegen.cpp
M clang/test/OpenMP/distribute_parallel_for_lastprivate_codegen.cpp
M clang/test/OpenMP/distribute_parallel_for_num_threads_codegen.cpp
M clang/test/OpenMP/distribute_parallel_for_private_codegen.cpp
M clang/test/OpenMP/distribute_parallel_for_simd_firstprivate_codegen.cpp
M clang/test/OpenMP/distribute_parallel_for_simd_lastprivate_codegen.cpp
M clang/test/OpenMP/distribute_parallel_for_simd_num_threads_codegen.cpp
M clang/test/OpenMP/distribute_parallel_for_simd_private_codegen.cpp
M clang/test/OpenMP/distribute_private_codegen.cpp
M clang/test/OpenMP/distribute_simd_firstprivate_codegen.cpp
M clang/test/OpenMP/distribute_simd_lastprivate_codegen.cpp
M clang/test/OpenMP/distribute_simd_private_codegen.cpp
M clang/test/OpenMP/for_firstprivate_codegen.cpp
M clang/test/OpenMP/for_lastprivate_codegen.cpp
M clang/test/OpenMP/for_linear_codegen.cpp
M clang/test/OpenMP/for_private_codegen.cpp
M clang/test/OpenMP/for_reduction_codegen.cpp
M clang/test/OpenMP/master_taskloop_in_reduction_codegen.cpp
M clang/test/OpenMP/master_taskloop_simd_in_reduction_codegen.cpp
M clang/test/OpenMP/parallel_copyin_codegen.cpp
M clang/test/OpenMP/parallel_firstprivate_codegen.cpp
M clang/test/OpenMP/parallel_for_linear_codegen.cpp
M clang/test/OpenMP/parallel_master_codegen.cpp
M clang/test/OpenMP/parallel_master_taskloop_firstprivate_codegen.cpp
M clang/test/OpenMP/parallel_master_taskloop_lastprivate_codegen.cpp
M clang/test/OpenMP/parallel_master_taskloop_simd_firstprivate_codegen.cpp
M clang/test/OpenMP/parallel_master_taskloop_simd_lastprivate_codegen.cpp
M clang/test/OpenMP/parallel_private_codegen.cpp
M clang/test/OpenMP/parallel_reduction_codegen.cpp
M clang/test/OpenMP/scope_codegen.cpp
M clang/test/OpenMP/sections_firstprivate_codegen.cpp
M clang/test/OpenMP/sections_lastprivate_codegen.cpp
M clang/test/OpenMP/sections_private_codegen.cpp
M clang/test/OpenMP/sections_reduction_codegen.cpp
M clang/test/OpenMP/simd_private_taskloop_codegen.cpp
M clang/test/OpenMP/single_codegen.cpp
M clang/test/OpenMP/single_firstprivate_codegen.cpp
M clang/test/OpenMP/single_private_codegen.cpp
M clang/test/OpenMP/target_has_device_addr_codegen.cpp
M clang/test/OpenMP/target_in_reduction_codegen.cpp
M clang/test/OpenMP/target_parallel_generic_loop_codegen-1.cpp
M clang/test/OpenMP/target_teams_distribute_firstprivate_codegen.cpp
M clang/test/OpenMP/target_teams_distribute_lastprivate_codegen.cpp
M clang/test/OpenMP/target_teams_distribute_parallel_for_firstprivate_codegen.cpp
M clang/test/OpenMP/target_teams_distribute_parallel_for_lastprivate_codegen.cpp
M clang/test/OpenMP/target_teams_distribute_parallel_for_private_codegen.cpp
M clang/test/OpenMP/target_teams_distribute_parallel_for_simd_firstprivate_codegen.cpp
M clang/test/OpenMP/target_teams_distribute_parallel_for_simd_lastprivate_codegen.cpp
M clang/test/OpenMP/target_teams_distribute_parallel_for_simd_private_codegen.cpp
M clang/test/OpenMP/target_teams_distribute_private_codegen.cpp
M clang/test/OpenMP/target_teams_distribute_simd_firstprivate_codegen.cpp
M clang/test/OpenMP/target_teams_distribute_simd_lastprivate_codegen.cpp
M clang/test/OpenMP/target_teams_distribute_simd_private_codegen.cpp
M clang/test/OpenMP/target_teams_generic_loop_private_codegen.cpp
M clang/test/OpenMP/task_codegen.cpp
M clang/test/OpenMP/task_in_reduction_codegen.cpp
M clang/test/OpenMP/taskloop_in_reduction_codegen.cpp
M clang/test/OpenMP/taskloop_simd_in_reduction_codegen.cpp
M clang/test/OpenMP/teams_distribute_firstprivate_codegen.cpp
M clang/test/OpenMP/teams_distribute_lastprivate_codegen.cpp
M clang/test/OpenMP/teams_distribute_parallel_for_firstprivate_codegen.cpp
M clang/test/OpenMP/teams_distribute_parallel_for_lastprivate_codegen.cpp
M clang/test/OpenMP/teams_distribute_parallel_for_num_threads_codegen.cpp
M clang/test/OpenMP/teams_distribute_parallel_for_private_codegen.cpp
M clang/test/OpenMP/teams_distribute_parallel_for_simd_firstprivate_codegen.cpp
M clang/test/OpenMP/teams_distribute_parallel_for_simd_lastprivate_codegen.cpp
M clang/test/OpenMP/teams_distribute_parallel_for_simd_num_threads_codegen.cpp
M clang/test/OpenMP/teams_distribute_parallel_for_simd_private_codegen.cpp
M clang/test/OpenMP/teams_distribute_private_codegen.cpp
M clang/test/OpenMP/teams_distribute_simd_firstprivate_codegen.cpp
M clang/test/OpenMP/teams_distribute_simd_lastprivate_codegen.cpp
M clang/test/OpenMP/teams_distribute_simd_private_codegen.cpp
M clang/test/OpenMP/teams_firstprivate_codegen.cpp
M clang/test/OpenMP/teams_generic_loop_private_codegen.cpp
M clang/test/OpenMP/teams_private_codegen.cpp
M clang/test/OpenMP/threadprivate_codegen.cpp
M clang/test/utils/update_cc_test_checks/Inputs/basic-cplusplus.cpp.expected
M clang/test/utils/update_cc_test_checks/Inputs/explicit-template-instantiation.cpp.expected
Log Message:
-----------
[Clang] Mark this pointer in destructors dead_on_return (#166276)
This helps to clean up any dead stores that come up at the end of the
destructor. The motivating example was a refactoring in libc++'s
basic_string implementation in 8dae17be2991cd7f0d7fd9aa5aecd064520a14f6
that added a zeroing store into the destructor, causing a large
performance regression on an internal workload. We also saw a ~0.2%
performance increase on an internal server workload when enabling this.
I also tested this against all of the non-flaky tests in our large C++
codebase and found a minimal number of issues that all happened to be in
user code.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list