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

ChenZheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 8 19:52:21 PDT 2023


shchenz added a comment.

> 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


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