Do this by refactoring the optimization and codegen pipelines into separate functions.
This saves a tiny bit of memory in non-LTO builds [1].
Paths
| Differential D111582
[clang] Teardown new PM data structures before running codegen pipeline ClosedPublic Authored by aeubanks on Oct 11 2021, 3:12 PM.
Details Summary Do this by refactoring the optimization and codegen pipelines into separate functions. This saves a tiny bit of memory in non-LTO builds [1].
Diff Detail
Event TimelineComment Actions Any chance of refactoring this code so naturally these objects are lexically scoped to their necessary lifetime, and just cease to exist before the code gen passes are run? (looks like this function is pretty long and might benefit from being broken up into pieces anyway - and one of those pieces could have these managers as locals, and return once that work is done, before the code gen work is started?) aeubanks retitled this revision from [clang] Clear IR analyses before codegen pipeline to [clang] Teardown new PM data structures before running codegen pipeline.Oct 12 2021, 10:52 AM Comment Actions Looks great!
This revision is now accepted and ready to land.Oct 12 2021, 12:22 PM This revision was landed with ongoing or failed builds.Oct 12 2021, 2:17 PM Closed by commit rG2cadef6537b3: [clang] Teardown new PM data structures before running codegen pipeline (authored by aeubanks). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 379185 clang/lib/CodeGen/BackendUtil.cpp
|
Looks like this comment got lost - might be worth preserving in RunCodegenPipeline