This is an archive of the discontinued LLVM Phabricator instance.

Add an option to hide "cold" blocks from CFG graph
ClosedPublic

Authored by apilipenko on Jun 3 2021, 12:06 PM.

Details

Summary

Introduce a new cl::opt to hide "cold" blocks from CFG DOT graphs. Use BFI to get block relative frequency. Hide the block if the frequency is below the threshold set by the command line option value.

This is a generalization of the existing cfg-hide-unreachable-paths and cfg-hide-deoptimize-paths options. Just like with the existing options the main use case is performance analysis. Hiding cold blocks reduces the size of the graph by highlighting the common path.

Diff Detail

Event Timeline

apilipenko created this revision.Jun 3 2021, 12:06 PM
apilipenko requested review of this revision.Jun 3 2021, 12:06 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 3 2021, 12:06 PM
hoy accepted this revision.Jun 4 2021, 6:23 PM

LGTM, thanks for working on this.

This revision is now accepted and ready to land.Jun 4 2021, 6:23 PM
davidxl accepted this revision.Jun 4 2021, 6:29 PM

lgtm

This revision was landed with ongoing or failed builds.Jun 8 2021, 11:29 AM
This revision was automatically updated to reflect the committed changes.