This is an archive of the discontinued LLVM Phabricator instance.

[Docs] Add some documentation for constructor homing, a debug info optimization (-fuse-ctor-homing)
ClosedPublic

Authored by akhuang on Feb 2 2021, 5:46 PM.

Details

Summary

Adding this, since there's currently no documentation about this.

Diff Detail

Event Timeline

akhuang requested review of this revision.Feb 2 2021, 5:46 PM
akhuang created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptFeb 2 2021, 5:46 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
dblaikie accepted this revision.Feb 2 2021, 8:28 PM

Sounds alright to me.

(non-action idle thoughts: Might be worth revisiting this documentation to make it a bit more direct/clearer that many of these optimizations (at least the vtable and ctor homing) rely on the assumption that the class is instantiated somewhere in the program (and that somewhere is built with debug info enabled) (the wording you've got here "This relies on the additional assumption that all classes that are not trivially constructible have a non-trivial constructor that is used somewhere." but maybe generalized/massaged a bit))

This revision is now accepted and ready to land.Feb 2 2021, 8:28 PM
rnk accepted this revision.Feb 3 2021, 3:01 PM

lgtm too

(non-action idle thoughts: Might be worth revisiting this documentation to make it a bit more direct/clearer that many of these optimizations (at least the vtable and ctor homing) rely on the assumption that the class is instantiated somewhere in the program (and that somewhere is built with debug info enabled) (the wording you've got here "This relies on the additional assumption that all classes that are not trivially constructible have a non-trivial constructor that is used somewhere." but maybe generalized/massaged a bit))

Yep. While looking at the existing documentation here, I kept thinking we need some standalone documentation on all the debug info features clang supports. There is a lot to cover.

  • -gmodules
  • -g0, -g1 / -gmlt / -gline-tables-only
  • -fstandalone-debug
  • this unused types thing
  • DWARF versions
  • PDBs and codeview
  • -fno-inline-line-tables
  • various attributes (nomerge, not_tail_called, nodebug/artificial)
  • -gcolumn-info
  • macro info
  • -gcodeview-ghash
  • fission / split dwarf
  • gdb indexes
  • pubnames
  • -gz
  • debugger tuning gdb/lldb
  • others
This revision was landed with ongoing or failed builds.Feb 3 2021, 3:27 PM
This revision was automatically updated to reflect the committed changes.