[coroutine] Salvage dbg.values in the original function as well
authorFelipe de Azevedo Piovezan <fpiovezan@apple.com>
Wed, 19 Apr 2023 13:04:54 +0000 (09:04 -0400)
committerFelipe de Azevedo Piovezan <fpiovezan@apple.com>
Fri, 21 Apr 2023 13:31:39 +0000 (09:31 -0400)
commit290494955c6c1deac9e876fa895cb14b9be37dd2
tree21e67a256d93d117b753ffff36836611a2806e45
parent4cdb91f9e700a74c0f40c9495d08a64365687a57
[coroutine] Salvage dbg.values in the original function as well

D97673 implemented salvaging o dbg.value inside coroutine funclets, but
left the original function untouched. Before, only dbg.addr and dbg.decl
would get salvaged.

D121324 implemented salvaging of dbg.addr and dbg.decl in the original
function as well, but not of dbg.values.

This patch unifies salvaging in the original function and related
funclets, so that all intrinsics are salvaged in all functions. This is
particularly useful for ABIs where the original function is also
rewritten to receive the frame pointer as an argument.

Differential Revision: https://reviews.llvm.org/D148745
llvm/lib/Transforms/Coroutines/CoroInternal.h
llvm/lib/Transforms/Coroutines/CoroSplit.cpp
llvm/test/Transforms/Coroutines/coro-debug-dbg.values.ll