[all-commits] [llvm/llvm-project] de40f6: [CSSPGO] Process functions in a top-down order on ...

Hongtao Yu via All-commits all-commits at lists.llvm.org
Thu Feb 11 12:40:02 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: de40f6d6230e2ec1383c52e555876235f9fd0077
      https://github.com/llvm/llvm-project/commit/de40f6d6230e2ec1383c52e555876235f9fd0077
  Author: Hongtao Yu <hoy at fb.com>
  Date:   2021-02-11 (Thu, 11 Feb 2021)

  Changed paths:
    M llvm/include/llvm/Transforms/IPO/SampleContextTracker.h
    M llvm/lib/Transforms/IPO/SampleContextTracker.cpp
    M llvm/lib/Transforms/IPO/SampleProfile.cpp
    A llvm/test/Transforms/SampleProfile/Inputs/profile-context-order.prof
    A llvm/test/Transforms/SampleProfile/Inputs/profile-topdown-order.prof
    A llvm/test/Transforms/SampleProfile/profile-context-order.ll
    A llvm/test/Transforms/SampleProfile/profile-topdown-order.ll

  Log Message:
  -----------
  [CSSPGO] Process functions in a top-down order on a dynamic call graph.

Functions are currently processed by the sample profiler loader in a top-down order defined by the static call graph. The order is being adjusted to be a top-down order based on the input context-sensitive profile. One benefit is that the processing order of caller and callee in one SCC would follow the context order in the profile to favor more inlining. Another benefit is that the processing order of caller and callee through an indirect call (which is not on the static call graph) can be honored which in turn allows for more inlining.

The profile top-down order for SCC is also extended to support non-CS profiles.

Two switches `-mllvm -use-profile-indirect-call-edges` and `-mllvm -use-profile-top-down-order` are being introduced.

Reviewed By: wmi

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




More information about the All-commits mailing list