This is an archive of the discontinued LLVM Phabricator instance.

Create a wrapper pass for BlockFrequencyInfo so that block frequency analysis can be done without requiring a pass.
ClosedPublic

Authored by congh on Jul 14 2015, 1:47 PM.

Details

Summary

There are already several wrapper passes in LLVM such as LoopInfoWrapperPass and DominatorTreeWrapperPass. The benefit of a wrapper pass is to decouple the analysis from the function pass. This patch creates a wrapper pass for BlockFrequencyInfo. This is useful when we want to do block frequency analysis conditionally (e.g. only in PGO mode) but don't want to add one more pass dependence.

Diff Detail

Repository
rL LLVM

Event Timeline

congh updated this revision to Diff 29708.Jul 14 2015, 1:47 PM
congh retitled this revision from to Create a wrapper pass for BlockFrequencyInfo so that block frequency analysis can be done without requiring a pass..
congh updated this object.
congh added a reviewer: dexonsmith.
congh added subscribers: llvm-commits, davidxl.
congh updated this revision to Diff 29725.Jul 14 2015, 3:44 PM

Update the patch according to dexonsmith's comments.

congh updated this revision to Diff 29731.Jul 14 2015, 4:24 PM

Split the chang on doFunction() to another commit.

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptOct 18 2021, 3:52 AM
Herald added a subscriber: wenlei. · View Herald Transcript