[all-commits] [llvm/llvm-project] ddcc60: [CoroSplit][DebugInfo] Adjust heuristic for moving...

Felipe de Azevedo Piovezan via All-commits all-commits at lists.llvm.org
Fri Sep 13 15:25:32 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ddcc601353db0464eb15a3e0258ec6789dd1602c
      https://github.com/llvm/llvm-project/commit/ddcc601353db0464eb15a3e0258ec6789dd1602c
  Author: Felipe de Azevedo Piovezan <fpiovezan at apple.com>
  Date:   2024-09-13 (Fri, 13 Sep 2024)

  Changed paths:
    M llvm/lib/Transforms/Coroutines/CoroSplit.cpp
    M llvm/test/Transforms/Coroutines/swift-async-dbg.ll

  Log Message:
  -----------
  [CoroSplit][DebugInfo] Adjust heuristic for moving DIScope of funclets (#108611)

CoroSplit has a heuristic where the scope line for funclets is adjusted
to match the line of the suspend intrinsic that caused the split. This
is useful as it avoids a jump on the line table from the original
function declaration to the line where the split happens.

However, very often using the line of the split is not ideal: if we can
avoid it, we should not have a line entry for the split location, as
this would cause breakpoints by line to match against two functions: the
funclet before and the funclet after the split.

This patch adjusts the heuristics to look for the first instruction with
a non-zero line number after the split. In other words, this patch makes
breakpoints on `await foo()` lines behave much more like a regular
function call.



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