[all-commits] [llvm/llvm-project] 1ddc51: Inliner: don't mark call sites as 'nounwind' if th...
Nicolai Hähnle via All-commits
all-commits at lists.llvm.org
Wed Jul 20 05:17:44 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 1ddc51d89d9d3a3f77d6ca47514a776641dc3e4e
https://github.com/llvm/llvm-project/commit/1ddc51d89d9d3a3f77d6ca47514a776641dc3e4e
Author: Nicolai Hähnle <nicolai.haehnle at amd.com>
Date: 2022-07-20 (Wed, 20 Jul 2022)
Changed paths:
M clang/test/CodeGen/PowerPC/builtins-ppc-ld-st-rmb.c
M clang/test/CodeGen/PowerPC/builtins-ppc-quadword-noi128.c
M clang/test/CodeGen/X86/keylocker.c
M clang/test/CodeGen/aarch64-bf16-dotprod-intrinsics.c
M clang/test/CodeGen/aarch64-ls64.c
M clang/test/CodeGen/aarch64-neon-2velem.c
M clang/test/CodeGen/aarch64-neon-across.c
M clang/test/CodeGen/aarch64-neon-fcvt-intrinsics.c
M clang/test/CodeGen/aarch64-neon-fma.c
M clang/test/CodeGen/aarch64-neon-fp16fml.c
M clang/test/CodeGen/aarch64-neon-tbl.c
M clang/test/CodeGen/aarch64-poly128.c
M clang/test/CodeGen/aarch64-v8.1a-neon-intrinsics.c
M clang/test/CodeGen/aarch64-v8.2a-neon-intrinsics.c
M clang/test/CodeGen/arm-bf16-convert-intrinsics.c
M clang/test/CodeGen/arm-bf16-dotprod-intrinsics.c
M clang/test/CodeGen/arm-neon-fma.c
M clang/test/CodeGen/arm-neon-numeric-maxmin.c
M clang/test/CodeGen/arm-neon-vcvtX.c
M clang/test/CodeGen/arm-v8.1a-neon-intrinsics.c
M clang/test/CodeGen/arm_acle.c
M clang/test/CodeGen/memcpy-inline-builtin.c
M clang/test/Headers/wasm.c
M clang/test/OpenMP/cancel_codegen.cpp
M clang/test/OpenMP/cancellation_point_codegen.cpp
M clang/test/OpenMP/distribute_parallel_for_reduction_task_codegen.cpp
M clang/test/OpenMP/for_reduction_task_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_for_reduction_task_codegen.cpp
M clang/test/OpenMP/parallel_master_reduction_task_codegen.cpp
M clang/test/OpenMP/parallel_master_taskloop_codegen.cpp
M clang/test/OpenMP/parallel_master_taskloop_lastprivate_codegen.cpp
M clang/test/OpenMP/parallel_master_taskloop_simd_lastprivate_codegen.cpp
M clang/test/OpenMP/parallel_reduction_task_codegen.cpp
M clang/test/OpenMP/parallel_sections_reduction_task_codegen.cpp
M clang/test/OpenMP/sections_reduction_task_codegen.cpp
M clang/test/OpenMP/target_in_reduction_codegen.cpp
M clang/test/OpenMP/target_parallel_codegen.cpp
M clang/test/OpenMP/target_parallel_for_codegen.cpp
M clang/test/OpenMP/target_parallel_for_reduction_task_codegen.cpp
M clang/test/OpenMP/target_parallel_for_simd_codegen.cpp
M clang/test/OpenMP/target_parallel_reduction_task_codegen.cpp
M clang/test/OpenMP/target_teams_codegen.cpp
M clang/test/OpenMP/target_teams_distribute_codegen.cpp
M clang/test/OpenMP/target_teams_distribute_parallel_for_reduction_task_codegen.cpp
M clang/test/OpenMP/target_teams_distribute_simd_codegen.cpp
M clang/test/OpenMP/task_codegen.cpp
M clang/test/OpenMP/task_if_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_parallel_for_reduction_task_codegen.cpp
M llvm/lib/Transforms/Utils/InlineFunction.cpp
M llvm/test/Transforms/Coroutines/coro-retcon-once-value.ll
M llvm/test/Transforms/Inline/noalias-calls-always.ll
M llvm/test/Transforms/Inline/noalias-calls.ll
M llvm/test/Transforms/Inline/noalias-cs.ll
M llvm/test/Transforms/Inline/noalias2.ll
M llvm/test/Transforms/PhaseOrdering/ARM/arm_mult_q15.ll
M llvm/test/Transforms/PhaseOrdering/deletion-of-loops-that-became-side-effect-free.ll
Log Message:
-----------
Inliner: don't mark call sites as 'nounwind' if that would be redundant
When F calls G calls H, G is nounwind, and G is inlined into F, then the
inlined call-site to H should be effectively nounwind so as not to lose
information during inlining.
If H itself is nounwind (which often happens when H is an intrinsic), we
no longer mark the callsite explicitly as nounwind. Previously, there
were cases where the inlined call-site of H differs from a pre-existing
call-site of H in F *only* in the explicitly added nounwind attribute,
thus preventing common subexpression elimination.
v2:
- just check CI->doesNotThrow
v3 (resubmit after revert at 344378808778c61d5599f4e0ac783ef7e6f8ed05):
- update Clang tests
Differential Revision: https://reviews.llvm.org/D129860
More information about the All-commits
mailing list