[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


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 98dd2f9ed3ddb0a114582d48d48f781d9c80a2da
      https://github.com/llvm/llvm-project/commit/98dd2f9ed3ddb0a114582d48d48f781d9c80a2da
  Author: spupyrev <spupyrev at fb.com>
  Date:   2021-12-02 (Thu, 02 Dec 2021)

  Changed paths:
    M llvm/lib/Transforms/Utils/SampleProfileInference.cpp
    A llvm/test/Transforms/SampleProfile/Inputs/profile-inference-islands.prof
    A llvm/test/Transforms/SampleProfile/profile-inference-islands.ll

  Log Message:
  -----------
  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.
{F19077343}

Reviewed By: hoy

Differential Revision: https://reviews.llvm.org/D109903




More information about the All-commits mailing list