[PATCH] D147506: [DebugLine] save one debug line entry for empty prologue
ChenZheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 24 23:58:17 PDT 2023
shchenz added a comment.
Hi @dblaikie , for now there are two kinds of debug line generations for non-integrated mode.
In `MCAsmStreamer::emitDwarfLocDirective()`:
- if `MAI->usesDwarfFileAndLocDirectives()` is `false`, for AIX XCOFF(AIX assembly does not have `.loc` and `.file` pseudos), the debug line entries will be collected to a container, same way with integrated-as mode does, and later in `finishImpl()`, the lower level function like `MCDwarfLineTable::emitOne()` will handle all collected debug line entries. I think there should be opportunity to handle zero-length skipping in `MCDwarfLineTable::emitOne()`.
- if `MAI->usesDwarfFileAndLocDirectives()` is `true`, for most other target, the `.loc` will be directly emitted to the output assembly file. So if we want to handle zero-length skipping for this case, we must do it before the `.loc` is emitted.
Due to this, handling the zero-length skipping in the higher level, when `recordSourceLine()` is called for each instruction and prologue, seems be consistent for all cases. So `DwarfDebug::beginInstruction()` seems like a right place. What do you think? Thanks!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147506/new/
https://reviews.llvm.org/D147506
More information about the llvm-commits
mailing list