[all-commits] [llvm/llvm-project] 055454: Salvage debug info for function arguments in coro-...

adrian-prantl via All-commits all-commits at lists.llvm.org
Tue Jan 26 15:06:33 PST 2021

  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 0554541b44548591373b690030dea28c5434be7c
  Author: Adrian Prantl <aprantl at apple.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M llvm/lib/Transforms/Coroutines/CoroFrame.cpp
    M llvm/lib/Transforms/Coroutines/CoroInternal.h
    M llvm/lib/Transforms/Coroutines/CoroSplit.cpp
    M llvm/test/Transforms/Coroutines/coro-debug-frame-variable.ll
    M llvm/test/Transforms/Coroutines/coro-debug.ll

  Log Message:
  Salvage debug info for function arguments in coro-split funclets.

This patch improves the availability for variables stored in the
coroutine frame by emitting an alloca to hold the pointer to the frame
object and rewriting dbg.declare intrinsics to point inside the frame
object using salvaged DIExpressions. Finally, a new alloca is created
in the funclet to hold the FramePtr pointer to ensure that it is
available throughout the entire function at -O0.

This path also effectively reverts D90772. The testcase updates
highlight nicely how every removed CHECK for a dbg.value is preceded
by a new CHECK for a dbg.declare.

Thanks to JunMa, Yifeng, and Bruno for their thoughtful reviews!

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


More information about the All-commits mailing list