[all-commits] [llvm/llvm-project] 522c25: [Coroutines] Salvage the debug information for cor...

Chuanqi Xu via All-commits all-commits at lists.llvm.org
Tue Aug 20 02:26:07 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 522c253f47ea27d8eeb759e06f8749092b1de71e
      https://github.com/llvm/llvm-project/commit/522c253f47ea27d8eeb759e06f8749092b1de71e
  Author: Chuanqi Xu <yedeng.yd at linux.alibaba.com>
  Date:   2024-08-20 (Tue, 20 Aug 2024)

  Changed paths:
    A clang/test/CodeGenCoroutines/coro-dwarf-O2.cpp
    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-O2.ll

  Log Message:
  -----------
  [Coroutines] Salvage the debug information for coroutine frames within optimizations

This patch tries to salvage the debug information for the coroutine
frames within optimizations by creating the help alloca varaibles with
optimizations too. We didn't do this when I implement it initially. I
roughtly remember the reason was, we feel the additional help alloca
variable may pessimize the performance, which is almost the most
important thing under optimizations. But now, it looks like the new
inserted help alloca variables can be optimized out by the following
optimizations. So it looks like the time to make it available within
optimizations.

And also, it looks like the following optimizations will convert the
generated dbg.declare instrinsic into dbg.value intrinsic within
optimizations.

In LLVM's test, there is a slightly regression
that a dbg.declare for the promise object failed to be remained after
this change. But it looks like we won't have a chance to see dbg.declare
for the promise object when we split the coroutine as that dbg.declare
will be converted into a dbg.value in early stage.

So everything looks fine.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list