[PATCH] D147506: [DebugLine] save one debug line entry for empty prologue

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 9 13:53:02 PDT 2023


dblaikie accepted this revision.
dblaikie added a comment.

In D147506#4328517 <https://reviews.llvm.org/D147506#4328517>, @shchenz wrote:

>> Ah :/ this again, feels to me like wanting something lower-level down in MC/MI to handle this... (what's the codepath that leads from this AsmPrinter.cpp 1024-1045 to BuildMI calls?)
>
> Oh, sorry for the confusion. AsmPrinter.cpp 1024-1045  does not call BuildMI, so the instructions added there will not be linked to the MachineFunction. My thought is if we can change lines(1024-1045) to call `BuildMI()` like other passes do, the new instructions will be part of MachineFunction, so lazy methods (which iterates all instructions in a MachineFunction with `MI-MBB-MF`) will know these prologue instructions. But seems calling `BuildMI` in AsmPrinter is not a right way. So we have to explicitly check the cases where instructions are inserted to prologue...
>
> Do you feel OK I commit the current patch? Or you would post a new fix in near future? Thanks. @dblaikie

Ah, thanks for the context.

I guess... it all seems a bit unfortunate, but I guess we can go with this.


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