This is an archive of the discontinued LLVM Phabricator instance.

[docs] Add note about interaction between clang plugins and -clear-ast-before-backend
ClosedPublic

Authored by aeubanks on Feb 28 2022, 9:31 AM.

Diff Detail

Event Timeline

aeubanks requested review of this revision.Feb 28 2022, 9:31 AM
aeubanks created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptFeb 28 2022, 9:31 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
aeubanks updated this revision to Diff 411825.Feb 28 2022, 9:38 AM

add header

thakis added a subscriber: thakis.Feb 28 2022, 9:40 AM
thakis added inline comments.
clang/docs/ClangPlugins.rst
209

this sounds like plugins turning off that flag saves memory

rnk added a comment.Feb 28 2022, 10:20 AM

Thanks for writing docs, apologies for bikeshedding.

clang/docs/ClangPlugins.rst
207

I'd try to word this as a general recommendation that plugins should run before the main action, rather than documentation that running after the main action has undesired side effects (memory usage, settings).

A first sentence suggestion:

To reduce peak memory usage of the compiler, plugins are recommended to run *before* the main action, which is usually code generation. This is because ... something `-clear-ast-before-backend`

rnk accepted this revision.Feb 28 2022, 12:06 PM

lgtm, thanks!

This revision is now accepted and ready to land.Feb 28 2022, 12:06 PM
This revision was landed with ongoing or failed builds.Feb 28 2022, 12:53 PM
This revision was automatically updated to reflect the committed changes.