This is an archive of the discontinued LLVM Phabricator instance.

Update docs for -fuse-ctor-homing
ClosedPublic

Authored by akhuang on Oct 18 2022, 10:57 AM.

Details

Summary

Update docs to reflect the fact that this flag is on by default now.

Fixes issue #58367 (https://github.com/llvm/llvm-project/issues/58367).

Diff Detail

Event Timeline

akhuang created this revision.Oct 18 2022, 10:57 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 18 2022, 10:57 AM
akhuang requested review of this revision.Oct 18 2022, 10:57 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 18 2022, 10:57 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
akhuang edited the summary of this revision. (Show Details)Oct 18 2022, 11:15 AM
akhuang added a reviewer: dblaikie.

(not sure whether to discuss this here or on the bug)

Should we remove the documentation? Part of the principles of "cc1" flags is that their implementation details, not to be publicly used and maybe not to be publicly documented either?

(not sure whether to discuss this here or on the bug)

Should we remove the documentation? Part of the principles of "cc1" flags is that their implementation details, not to be publicly used and maybe not to be publicly documented either?

That sounds good to me, I guess this paragraph is really only here for "-fno-use-ctor-homing" which doesn't seem like it needs to be documented here.

akhuang updated this revision to Diff 468677.Oct 18 2022, 1:37 PM
akhuang edited the summary of this revision. (Show Details)

Remove documentation paragraph.

Actually, maybe I should add some of this info to the -fstandalone-debug section.

Actually, maybe I should add some of this info to the -fstandalone-debug section.

Ah, sure, if you like.

At some point I think I/someone should write a full ramble about DWARF type homing in general - I've explained it more than a few times (most often when people hit the "I can't print out a std::string because gdb says something about being unable to find _Rep" - and then after a long-winded explanation/justification, comes down to telling them to install the -dbg or -dev package for libstdc++, basically).

(Speaking of which, might be worth pushing on the changes to remove the flags/support for opting out of ctor homing... I know @probinson had some concerns - but I really don't want to end up holding onto the tech debt of these variations & I the original motivation for naming/creating -fstandalone-debug was to have a principled way to decide what goes into this feature and what doesn't - and the rationale for ctor homing is as sound as vtable homing in that regard)

akhuang updated this revision to Diff 468687.Oct 18 2022, 1:55 PM

Move ctor homing info to fstandalone-debug.

+jmorse who is closer to this topic than I am.

We've had a few complaints from licensees about ctor homing, and debug-info size in general is something of a sensitive topic. But if we can come to a place where -fstandalone-debug is an acceptable fallback, I can live with that.

dblaikie accepted this revision.Oct 18 2022, 3:20 PM

Looks good to me with the addition of the forth homing strategy.

+jmorse who is closer to this topic than I am.

We've had a few complaints from licensees about ctor homing, and debug-info size in general is something of a sensitive topic. But if we can come to a place where -fstandalone-debug is an acceptable fallback, I can live with that.

Sounds good (-fstandalone-debug is a pretty big size regression, though, which makes it difficult to swallow) - sorry, didn't mean to derail this review, I should go pick this up again on whatever review I was proposing removing the ctor homing flags/fully rolling it into no-standalone-debug...

clang/docs/UsersManual.rst
2845–2850

There's a forth strategy - clang will emit type definitions for types that are the subject of a explicit template instantiation declarations only in the presence of an explicit instantiation definition for the type.

This revision is now accepted and ready to land.Oct 18 2022, 3:20 PM
akhuang updated this revision to Diff 471240.Oct 27 2022, 11:29 AM

Add another debug info strategy to the description

This revision was automatically updated to reflect the committed changes.