[all-commits] [llvm/llvm-project] c1359e: [Coroutines] Salvege Debug.values

Chuanqi Xu via All-commits all-commits at lists.llvm.org
Wed May 12 22:07:31 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c1359ef07e8240b4350802b4998aedc1239a91d0
      https://github.com/llvm/llvm-project/commit/c1359ef07e8240b4350802b4998aedc1239a91d0
  Author: Chuanqi Xu <yedeng.yd at linux.alibaba.com>
  Date:   2021-05-13 (Thu, 13 May 2021)

  Changed paths:
    M llvm/lib/Transforms/Coroutines/CoroFrame.cpp
    M llvm/lib/Transforms/Coroutines/CoroInternal.h
    M llvm/lib/Transforms/Coroutines/CoroSplit.cpp
    A llvm/test/Transforms/Coroutines/coro-debug-dbg.values-not_used_in_frame.ll
    A llvm/test/Transforms/Coroutines/coro-debug-dbg.values.ll

  Log Message:
  -----------
  [Coroutines] Salvege Debug.values

Summary: The previous implementation of coro-split didn't collect values
used by dbg instructions into the spills which made a log debug info
unavailable with optimization on.
This patch tries to collect these uses which are used by dbg.values. In
this way, the debugbility of coroutine could be as powerful as normal
functions with optimization on.

To avoid enlarging the coroutine frame, this patch only collects
`dbg.value` whose value is already in the coroutine frame. This decision
may make some debug info getting unavailable. But if we are with
optimization on, the performance issue should be considered first. And
this patch would make the debugbility of coroutine to be better only
without changing the layout of the frame.

Test-plan: check-llvm

Reviewed By: aprantl, lxfind

Differential Revision: https://reviews.llvm.org/D97673




More information about the All-commits mailing list