[PATCH] D109119: Run coro::salavageDebugInfo on dbg.declares in entry function

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 1 18:17:46 PDT 2021


aprantl created this revision.
aprantl added reviewers: lxfind, bruno.
Herald added a subscriber: hiraditya.
aprantl requested review of this revision.
Herald added a project: LLVM.

While looking through diffs between the Swift branch and llvm.org if found the following patch that I previously forgot to upstream. The patch also calls coro::salavageDebugInf()o on all dbg.declares in entry function. This is necessary for Swift because in the Swift calling convention the entry function can already have a coroutine context argument. I believe that the patch is neutral for C++ coroutines at -O0 (and mildly beneficial at -O), as it does rewrite dbg.declares to point into the freshly setup coroutine frame, as shown in the updated test.


https://reviews.llvm.org/D109119

Files:
  llvm/lib/Transforms/Coroutines/CoroSplit.cpp
  llvm/test/Transforms/Coroutines/coro-debug-coro-frame.ll
  llvm/test/Transforms/Coroutines/coro-debug-frame-variable.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109119.370129.patch
Type: text/x-patch
Size: 15411 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210902/98debae7/attachment-0001.bin>


More information about the llvm-commits mailing list