This is an archive of the discontinued LLVM Phabricator instance.

[HotColdSplitting] Get DT and PDT from the pass manager.
ClosedPublic

Authored by fhahn on Jan 23 2019, 3:48 AM.

Details

Summary

Instead of manually computing DT and PDT, we can get the from the pass
manager, which ideally has them already cached. With the new pass
manager, we could even preserve DT/PDT on a per function basis in a
module pass.

I think this also addresses the TODO about re-using the computed DTs for
BFI. IIUC, GetBFI will fetch the DT from the pass manager and when we
will fetch the cached version later.

I do not have things set up to measure the compile time impact of this
change, but maybe @vedantk could give it a try?

Diff Detail

Repository
rL LLVM

Event Timeline

fhahn created this revision.Jan 23 2019, 3:48 AM
vsk accepted this revision.Jan 23 2019, 8:24 AM

Thanks! CTMark results look great, LGTM.

This revision is now accepted and ready to land.Jan 23 2019, 8:24 AM
This revision was automatically updated to reflect the committed changes.
fhahn added a comment.Jan 24 2019, 3:29 AM

Reverted in rL352041, as this caused leak in the pass manager. I will recommit this, after tracking down the problem.