William Woodruff via llvm-dev
2021-Apr-28 15:52 UTC
[llvm-dev] Tracking all prologue and epilogue insertions through codegen/lowering
> I’m doing some program analysis research within LLVM. One thing that I’d like to be able to > do is track LLVM’s generation of function prologues and epiloguesAnswering my own question with this: I managed to completely overlook the fact that DWARF (since at least v3) has supported fields within the line program state machine that explicitly record whether a particular entry indicates a prologue end (DW_LNS_set_prologue_end) and epilogue begin (DW_LNS_set_epilogue_begin). - William
via llvm-dev
2021-Apr-28 16:22 UTC
[llvm-dev] Tracking all prologue and epilogue insertions through codegen/lowering
> > I’m doing some program analysis research within LLVM. One thing that I’d > like to be able to > > do is track LLVM’s generation of function prologues and epilogues > > > Answering my own question with this: I managed to completely overlook the > fact > that DWARF (since at least v3) has supported fields within the line > program state > machine that explicitly record whether a particular entry indicates a > prologue end > (DW_LNS_set_prologue_end) and epilogue begin (DW_LNS_set_epilogue_begin).Well, yes, DWARF has that. LLVM does not do a spectacular job of identifying those points, although it has been getting better at it over the years. --paulr