[all-commits] [llvm/llvm-project] 98dd2f: profi - a flow-based profile inference algorithm: ...
Hongtao Yu via All-commits
all-commits at lists.llvm.org
Thu Dec 2 11:04:39 PST 2021
Author: spupyrev <spupyrev at fb.com>
Date: 2021-12-02 (Thu, 02 Dec 2021)
profi - a flow-based profile inference algorithm: Part II (out of 3)
This is a continuation of D109860.
Traditional flow-based algorithms cannot guarantee that the resulting edge
frequencies correspond to a *connected* flow in the control-flow graph. For
example, for an instance in the attached figure, a flow-based (or any other)
inference algorithm may produce an output in which the hot loop is disconnected
from the entry block (refer to the rightmost graph in the figure). Furthermore,
creating a connected minimum-cost maximum flow is a computationally NP-hard
problem. Hence, we apply a post-processing adjustments to the computed flow
by connecting all isolated flow components ("islands").
This feature helps to keep all blocks with sample counts connected and results
in significant performance wins for some binaries.
Reviewed By: hoy
Differential Revision: https://reviews.llvm.org/D109903
More information about the All-commits