[all-commits] [llvm/llvm-project] b10303: [Coroutines] [NFCI] Don't search the DILocalVariab...

Chuanqi Xu via All-commits all-commits at lists.llvm.org
Sun Aug 25 18:43:45 PDT 2024


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

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

  Log Message:
  -----------
  [Coroutines] [NFCI] Don't search the DILocalVariable for __promise when constructing the debug varaible for __coro_frame (#105626)

As the title mentioned, do not search for the DILocalVariable for
__promise when constructing the debug variable for __coro_frame.

This should make sense because the debug variable of `__coro_frame`
shouldn't dependent on the debug variable of `__promise`. And actually,
it is not. Currently, we search the debug variable for `__promise` only
because we want to get the debug location and the debug scope for the
`__promise`. However, we can construct the debug location directly from
the debug scope of the being compiled function. Then it is not necessary
any more to search the `__promise` variable.

And this patch makes the codes to construct the debug variable for
`__coro_frame` to be more stable. Now we will always be able to
construct the debug variable for the coroutine frame no matter if we
found the debug variable for the __promise or not.

This patch is not strictly NFC but it is intended to not affect any end
users.



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