[all-commits] [llvm/llvm-project] 849807: [Coroutines] Handle InvokeInst in SalvageDebugInfo

Chuanqi Xu via All-commits all-commits at lists.llvm.org
Thu Dec 2 21:54:05 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 84980761a777619291e4877014c5f00ca512e4b8
      https://github.com/llvm/llvm-project/commit/84980761a777619291e4877014c5f00ca512e4b8
  Author: Chuanqi Xu <yedeng.yd at linux.alibaba.com>
  Date:   2021-12-03 (Fri, 03 Dec 2021)

  Changed paths:
    M llvm/lib/Transforms/Coroutines/CoroFrame.cpp
    M llvm/test/Transforms/Coroutines/coro-debug.ll

  Log Message:
  -----------
  [Coroutines] Handle InvokeInst in SalvageDebugInfo

Since coroutine would be splitted into pieces, compiler would move the
dbg.declare intrinsic after the Storage is created to make sure the
corresponding dbg instruction is still available aftet splitted.
However, it would be problematic if the storage instruction is an
InvokeInst, which is a terminator. We couldn't move instruction after an
InvokeInst. This patch tries to move the dbg.declare intrinsic in the
normal destination of the InvokeInst. It should make sense due to the
Storage should be invalid in exception path.




More information about the All-commits mailing list