[PATCH] D98213: [InlineCost] Enable the cost benefit analysis on FDO

Kazu Hirata via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 11 11:15:15 PST 2021


kazu added inline comments.


================
Comment at: llvm/lib/Analysis/InlineCost.cpp:683
+      // Honor the explicit request from the user.
+      if (!InlineEnableCostBenefitAnalysis)
+        return false;
----------------
davidxl wrote:
> Why not change the default of this option to true, then there is no need to check explicit occurences?
I'd like to do two things here:

- Turn on the cost benefit analysis automatically on FDO.
- Let the user turn on/off the cost benefit analysis.

The latter allows us to tell what happens to the performance if I disable the cost benefit analysis when we are using FDO.  It also allows us to turn on the cost benefit analysis on sample profile.

If I change the default to true, I would have to put a logic to turn it off on sample profile unless the user explicitly requests the cost benefit analysis.  In other words, as long as I want to honor an explicit user request, I must check for the occurrence.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98213/new/

https://reviews.llvm.org/D98213



More information about the llvm-commits mailing list