[all-commits] [llvm/llvm-project] e8aec7: [NPM][Inliner] Factor ImportedFunctionStats in the...

Mircea Trofin via All-commits all-commits at lists.llvm.org
Wed Jan 20 11:08:02 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e8aec763a57e211420dfceb2a8dc6b88574924f3
      https://github.com/llvm/llvm-project/commit/e8aec763a57e211420dfceb2a8dc6b88574924f3
  Author: Mircea Trofin <mtrofin at google.com>
  Date:   2021-01-20 (Wed, 20 Jan 2021)

  Changed paths:
    M llvm/include/llvm/Analysis/InlineAdvisor.h
    M llvm/include/llvm/Analysis/MLInlineAdvisor.h
    M llvm/include/llvm/Analysis/ReplayInlineAdvisor.h
    M llvm/include/llvm/Transforms/IPO/Inliner.h
    M llvm/include/llvm/Transforms/Utils/ImportedFunctionsInliningStatistics.h
    M llvm/lib/Analysis/InlineAdvisor.cpp
    M llvm/lib/Analysis/MLInlineAdvisor.cpp
    M llvm/lib/Analysis/ReplayInlineAdvisor.cpp
    M llvm/lib/Transforms/IPO/Inliner.cpp
    M llvm/lib/Transforms/IPO/SampleProfile.cpp
    M llvm/lib/Transforms/Utils/ImportedFunctionsInliningStatistics.cpp
    M llvm/test/Transforms/Inline/inline_stats.ll

  Log Message:
  -----------
  [NPM][Inliner] Factor ImportedFunctionStats in the InlineAdvisor

When using 2 InlinePass instances in the same CGSCC - one for other
mandatory inlinings, the other for the heuristic-driven ones - the order
in which the ImportedFunctionStats would be output-ed would depend on
the destruction order of the inline passes, which is not deterministic.

This patch moves the ImportedFunctionStats responsibility to the
InlineAdvisor to address this problem.

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




More information about the All-commits mailing list