[all-commits] [llvm/llvm-project] 65cd3c: [Inliner] Compute the full cost for the cost benef...

llvmbot via All-commits all-commits at lists.llvm.org
Tue Jan 5 12:54:17 PST 2021


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 65cd3cbb3fc9ee440234a5adbfea6cbe4834f3d3
      https://github.com/llvm/llvm-project/commit/65cd3cbb3fc9ee440234a5adbfea6cbe4834f3d3
  Author: Kazu Hirata <kazu at google.com>
  Date:   2021-01-05 (Tue, 05 Jan 2021)

  Changed paths:
    M llvm/lib/Analysis/InlineCost.cpp

  Log Message:
  -----------
  [Inliner] Compute the full cost for the cost benefit analsysis

This patch teaches the inliner to compute the full cost for a call
site where the newly introduced cost benefit analysis is enabled.

Note that the cost benefit analysis requires the full cost to be
computed.  However, without this patch or the -inline-cost-full
option, the early termination logic would kick in when the cost
exceeds the threshold, so we don't get to perform the cost benefit
analysis.  For this reason, we would need to specify four clang
options:

  -mllvm -inline-cost-full
  -mllvm -inline-enable-cost-benefit-analysis

This patch eliminates the need to specify -inline-cost-full.

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




More information about the All-commits mailing list