[PATCH] D94982: [NPM][Inliner] Factor ImportedFunctionStats in the InlineAdvisor

Mircea Trofin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 19 10:20:09 PST 2021


mtrofin created this revision.
mtrofin added reviewers: aeubanks, davidxl, modimo.
Herald added subscribers: wenlei, hiraditya, eraman.
mtrofin requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D94982

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94982.317616.patch
Type: text/x-patch
Size: 15309 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210119/285df586/attachment.bin>


More information about the llvm-commits mailing list