This is an archive of the discontinued LLVM Phabricator instance.

[DebugInfo] Add -fno-ctor-homing for as counterpart to -fuse-ctor-homing
ClosedPublic

Authored by akhuang on Jul 22 2021, 12:23 PM.

Details

Summary

Add an opt out flag for constructor homing.

Diff Detail

Event Timeline

akhuang requested review of this revision.Jul 22 2021, 12:23 PM
akhuang created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptJul 22 2021, 12:23 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
akhuang updated this revision to Diff 360926.Jul 22 2021, 12:29 PM

add actual flag

dblaikie accepted this revision.Jul 22 2021, 12:42 PM

Looks alright to me. (bit awkward having a documented cc1 option - since the cc1 options aren't meant to be user facing - hadn't really thought about/noticed that when reviewing the documentation originally in D95911)

This revision is now accepted and ready to land.Jul 22 2021, 12:42 PM

Looks alright to me. (bit awkward having a documented cc1 option - since the cc1 options aren't meant to be user facing - hadn't really thought about/noticed that when reviewing the documentation originally in D95911)

Oh, true. Since we're making ctor homing default maybe I should just make them user facing flags.

Looks alright to me. (bit awkward having a documented cc1 option - since the cc1 options aren't meant to be user facing - hadn't really thought about/noticed that when reviewing the documentation originally in D95911)

Oh, true. Since we're making ctor homing default maybe I should just make them user facing flags.

I have mixed feelings - on the one hand, yeah, we're changing the behavior of -fno-standalone-debug and giving people a tool to undo that change if it's problematic is good (less chance we have to churn through reverting the change, fixing, reapplying, etc, if there's a way to opt-out, at least in the short term). But equally I don't want to proliferate various rather arbitrary buckets of debug info type homing - I really want to encourage people to think of it as a fairly all-or-nothing situation, because I don't think there's a good way to explain/improve/modify/use the feature if it's "whatever is good enough for my use case". Especially now that there's the standalone_debug attribute that can be used to fix particular use cases where a type is needed across a -g0 boundary.

So... eh. Could go either way - your call, really. Though if we make it a full driver option, maybe a caveat that we may remove the functionality in the future (but that'll mean probably having to leave the flag in as a no-op/with some deprecation warning for some time after removing the functionality).

akhuang added a subscriber: jmorse.Jul 22 2021, 2:12 PM

Looks alright to me. (bit awkward having a documented cc1 option - since the cc1 options aren't meant to be user facing - hadn't really thought about/noticed that when reviewing the documentation originally in D95911)

Oh, true. Since we're making ctor homing default maybe I should just make them user facing flags.

I have mixed feelings - on the one hand, yeah, we're changing the behavior of -fno-standalone-debug and giving people a tool to undo that change if it's problematic is good (less chance we have to churn through reverting the change, fixing, reapplying, etc, if there's a way to opt-out, at least in the short term). But equally I don't want to proliferate various rather arbitrary buckets of debug info type homing - I really want to encourage people to think of it as a fairly all-or-nothing situation, because I don't think there's a good way to explain/improve/modify/use the feature if it's "whatever is good enough for my use case". Especially now that there's the standalone_debug attribute that can be used to fix particular use cases where a type is needed across a -g0 boundary.

So... eh. Could go either way - your call, really. Though if we make it a full driver option, maybe a caveat that we may remove the functionality in the future (but that'll mean probably having to leave the flag in as a no-op/with some deprecation warning for some time after removing the functionality).

Yep, good point. Agree that it should be all-or-nothing but I feel like there might be other people in situations like in chrome mac/lldb or what @jmorse mentioned, where we use -fno-standalone-debug because it's impractical to use fstandalone-debug, and having a flag to keep the previous behavior is easier than having people make changes downstream.

Anyway, I think I'll leave it as a cc1 flag for now.

This revision was landed with ongoing or failed builds.Jul 22 2021, 2:52 PM
This revision was automatically updated to reflect the committed changes.