This is an archive of the discontinued LLVM Phabricator instance.

[clang] Pass -clear-ast-before-backend in Clang::ConstructJob()
ClosedPublic

Authored by aeubanks on Oct 6 2021, 1:59 PM.

Diff Detail

Event Timeline

aeubanks created this revision.Oct 6 2021, 1:59 PM
aeubanks edited the summary of this revision. (Show Details)Oct 8 2021, 11:54 AM
aeubanks published this revision for review.Oct 12 2021, 10:28 PM
aeubanks retitled this revision from [clang] Always pass -clear-ast-before-backend to [clang] Pass -clear-ast-before-backend.
aeubanks edited the summary of this revision. (Show Details)
aeubanks added reviewers: rnk, dblaikie.
aeubanks retitled this revision from [clang] Pass -clear-ast-before-backend to [clang] Pass -clear-ast-before-backend in Clang::ConstructJob().
Herald added a project: Restricted Project. · View Herald TranscriptOct 12 2021, 10:30 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript

Plan is still to address the "this only works with disable free" issue? (I've some preference that be addressed before this feature is turned on by default)

& is there a flag to pass to turn this off if someone had trouble with it? (doesn't necessarily have to be, but just checking)

Plan is still to address the "this only works with disable free" issue? (I've some preference that be addressed before this feature is turned on by default)

https://reviews.llvm.org/D111767. Thanks for pushing back, this actually does help a bit more with memory savings. I was worried that we'd be doing a bunch of pointer chasing if we supported -clear-ast-before-backend without -disable-free but couldn't measure any runtime regressions aside from some nullifying tiny wins gained by this patch.

& is there a flag to pass to turn this off if someone had trouble with it? (doesn't necessarily have to be, but just checking)

Just like -disable-free doesn't have a flag, I don't want one for this at least for now. I'd rather just revert this change and fix any issues. If we come across weird issues then we may have to add a flag.

dblaikie accepted this revision.Oct 14 2021, 12:35 PM

Plan is still to address the "this only works with disable free" issue? (I've some preference that be addressed before this feature is turned on by default)

https://reviews.llvm.org/D111767. Thanks for pushing back, this actually does help a bit more with memory savings. I was worried that we'd be doing a bunch of pointer chasing if we supported -clear-ast-before-backend without -disable-free but couldn't measure any runtime regressions aside from some nullifying tiny wins gained by this patch.

Great, thanks for that!

& is there a flag to pass to turn this off if someone had trouble with it? (doesn't necessarily have to be, but just checking)

Just like -disable-free doesn't have a flag, I don't want one for this at least for now. I'd rather just revert this change and fix any issues. If we come across weird issues then we may have to add a flag.

Yep, sounds good to me.

This revision is now accepted and ready to land.Oct 14 2021, 12:35 PM
aeubanks edited the summary of this revision. (Show Details)Oct 14 2021, 2:40 PM
aeubanks updated this revision to Diff 379866.Oct 14 2021, 3:30 PM

force off for the clang interpreter
I thought I ran check-clang, apparently I didn't

This revision was landed with ongoing or failed builds.Oct 15 2021, 10:19 AM
This revision was automatically updated to reflect the committed changes.

After this patch, -print-stats started erroring out. I filed a bug at https://bugs.llvm.org/show_bug.cgi?id=52193.