[llvm-dev] [DebugInfo] Enabling constructor homing by default in clang

63 views
Skip to first unread message

Amy Huang via llvm-dev

unread,
Jul 15, 2021, 2:06:43 PM7/15/21
to llvm-dev

A while back I tried turning on constructor homing (-debug-info-kind=constructor) by default in clang. Ctor homing is a debug info optimization that reduces the amount of debug info that is emitted for class types.

The main blocker was that for some libc++ types we avoid calling the constructor. Since then I've added a attribute for classes that ignores ctor homing (`__attribute__((standlone_debug))`) and added it to the libc++ types (7c2f58278e66). 

I think at this point we can try enabling it by default in Clang -- it's currently being used in chromium and google codebases. Thought I'd email the llvm-dev list in case people have thoughts/opinions/concerns about this. (patch is at https://reviews.llvm.org/D106084)

David Blaikie via llvm-dev

unread,
Jul 15, 2021, 2:14:52 PM7/15/21
to Amy Huang, Adrian Prantl, Jonas Devlieghere, Duncan P. N. Exon Smith, llvm-dev
Thanks Amy! + a few folks to highlight this.

_______________________________________________
LLVM Developers mailing list
llvm...@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev

Adrian Prantl via llvm-dev

unread,
Jul 15, 2021, 7:47:59 PM7/15/21
to David Blaikie, llvm-dev
Thanks for letting us know. Is my understanding correct that "enabling by default" means when -flimit-debuginfo would be used, or would it also affect -fstandalone-debuginfo?

As always, please watch the https://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake bot after making debug info changes.

thanks,
adrian

Amy Huang via llvm-dev

unread,
Jul 15, 2021, 7:52:01 PM7/15/21
to Adrian Prantl, llvm-dev
Yep, it would happen with -flimit-debug-info (-fno-standalone-debug) but won't affect -fstandalone-debug.


Adrian Prantl via llvm-dev

unread,
Jul 15, 2021, 7:55:55 PM7/15/21
to Amy Huang, llvm-dev
Then there's no concern for Darwin. Let's do it! 

-- adrian
Reply all
Reply to author
Forward
0 new messages