[all-commits] [llvm/llvm-project] 243e62: [Coroutines] Directly remove unnecessary lifetime ...
Nikita Popov via All-commits
all-commits at lists.llvm.org
Fri Apr 14 01:22:46 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 243e62b9d8760cdf12cb2f0a0c49f41aa50b3b6f
https://github.com/llvm/llvm-project/commit/243e62b9d8760cdf12cb2f0a0c49f41aa50b3b6f
Author: Nikita Popov <npopov at redhat.com>
Date: 2023-04-14 (Fri, 14 Apr 2023)
Changed paths:
M clang/test/CodeGenCoroutines/coro-always-inline.cpp
M llvm/lib/Transforms/Coroutines/CoroFrame.cpp
M llvm/test/Transforms/Coroutines/coro-alloca-loop-carried-address.ll
Log Message:
-----------
[Coroutines] Directly remove unnecessary lifetime intrinsics
The insertSpills() code will currently skip lifetime intrinsic users
when replacing the alloca with a frame reference. Rather than
leaving behind the dead lifetime intrinsics working on the old
alloca, directly remove them. This makes sure the alloca can be
dropped as well.
I noticed this as a regression when converting tests to opaque
pointers. Without opaque pointers, this code didn't really do
anything, because there would usually be a bitcast in between.
The lifetimes would get rewritten to the frame pointer. With
opaque pointers, this code now triggers and leaves behind users
of the old allocas.
Differential Revision: https://reviews.llvm.org/D148240
More information about the All-commits
mailing list