With basic block sections, there are multiple flexible text sections for
a function, allow multiple .cv_loc directives for a function.
Signed-off-by: Pan, Tao <tao.pan@intel.com>
Differential D101421
[DebugInfo] Enable CodeView DebugInfo for basic block sections TaoPan on Apr 27 2021, 7:05 PM. Authored by
Details
Diff Detail
Event Timeline
Comment Actions Thanks for your review comment!
Comment Actions Change condition from MachineBasicBlock is begin section to MachineFunction has BB sections and add comment
Comment Actions Sorry for the delay.
Comment Actions Thanks for your review comments!
Comment Actions Thanks for your big help!
|
This check prevents us from crashing later in CodeViewContext::emitLineTableForFunction when it calls:
If those two labels are in different sections, this just moves the crash later. Which makes me wonder if any BB section splitting happens in the test case you added. Does it exercise that yet, or does that come later?
The codeview line table format assumes functions are contiguous to avoid extra relocations. There is a relocation to the function start at the beginning, and the rest is a sequence of code offsets and line numbers. I wonder if it would be better to plan to produce a line table per section instead of trying to make one holistic line table. Then we could keep this check. So, if that is the long term plan, maybe we can leave this code here in this change.