[PATCH] D69839: [DebugInfo] Fix for stopping emission of debug_macinfo section in normal case and -fno-debug-macro switch enabled case.

Sourabh Singh Tomar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 5 10:57:43 PST 2019


SouraVX added a comment.

In D69839#1734120 <https://reviews.llvm.org/D69839#1734120>, @dblaikie wrote:

> I think the right fix for this would be to move the section change inside the if inside the loop (only changing section when we're about to emit macros - it's cheap to change the section to the section you're already in, so there's not much to be gained by checking early/separately)


Thanks for reviewing this.
The Intention here is stop the emission{even switching of the section}, if the CUNode macro list is empty, just like first and foremost check as we prepare / enter for emission CUMap.empty(). Although that's a loop{CUNode check for macro list} we can't avoid. 
BTW is their I'm missing something, I mean in your approach. If we do this check{CUNode macro list} before / after switching section ?? does this affect{unintentionally  leave some void} anything ?

> But that would break the tail (end of macro list mark) - but that's broken. There should be an end of list for each CU's macro contribution - currently the macro output for LTO would be pretty weird - one big macro list, which each CU being told to start at different points on the list...
> 
> So, the bug should be fixed & then the section change can be sunk into the loop/condition.




Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69839/new/

https://reviews.llvm.org/D69839





More information about the llvm-commits mailing list