https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121093
--- Comment #7 from Jan Hubicka <hubicka at ucw dot cz> --- > > I think we scrapped such blocks to shrink what we stream to LTO and reduce > the memory footprint and also to shrink useless debug info. As you say > C++ is full of "empty" (early) inlined functions. At some point doing this > was quite important. Yep, I remember measuring that. Debug info with LTO is certainly not cheap even though we somewhat improved over a time. > > But we can of course re-consider for afdo, there's already strange afdo > conditionals in the code. One problem is that we do not have option "binary will be used for afdo". LLVM has -fdebug-info-for-auto-profile. To make AFDO happy we need to preserve the debug statments but also be able to represent the fact that one instruction may be associated with multiple locations with multiple inline stacks. Currently we are mixing up inline stacks since they are per-instructoin-address only. I implemented some hacks to create_gcov to mitigate this (check if the line number seem to belong to the function or its caller in the stack), lets see if that gets me somewhere. Again I think it may be interesting feature from debug info experinece since one can breakpoint in inline function and end up with correct inline stack to inspect local variables, but gdb nor llvm can do it at the moment. If you breakpoint on one of the lines associated with a given instruction it will always show you location of last line associated with it and expect the inline stack to correspond to it. Honza