This is an archive of the discontinued LLVM Phabricator instance.

[clang] Teardown new PM data structures before running codegen pipeline
ClosedPublic

Authored by aeubanks on Oct 11 2021, 3:12 PM.

Details

Diff Detail

Event Timeline

aeubanks created this revision.Oct 11 2021, 3:12 PM
aeubanks requested review of this revision.Oct 11 2021, 3:12 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 11 2021, 3:12 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript

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
aeubanks edited the summary of this revision. (Show Details)
dblaikie accepted this revision.Oct 12 2021, 12:22 PM

Looks great!

clang/lib/CodeGen/BackendUtil.cpp
1441–1442

Looks like this comment got lost - might be worth preserving in RunCodegenPipeline

This revision is now accepted and ready to land.Oct 12 2021, 12:22 PM
aeubanks updated this revision to Diff 379175.Oct 12 2021, 1:54 PM

add back a (similar) comment

This revision was landed with ongoing or failed builds.Oct 12 2021, 2:17 PM
This revision was automatically updated to reflect the committed changes.