[PATCH] D35850: [InlineCost] Add cl::opt to allow full inline cost to be computed for debugging purposes.

Haicheng Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 10 13:21:50 PDT 2017


haicheng added a comment.

In https://reviews.llvm.org/D35850#837071, @eraman wrote:

> analyzeBlock bails out when inlining is not feasible due to things like recursive call, dynamic alloca etc. Arguably it doesn't make sense to compute the full inline cost even with this new option (and that's the behavior with this patch). In that case, especially with the ORE hookup, there should be some indication that the cost is not fully computed because the callee can not get inlined even if cost < threshold.


With option -inline-cost-full enabled, the output of optimization remarks is like below if anything like recursive call, dynamic alloca is found.

`foz not inlined into bar because it should never be inlined (cost=never)`

Pelease let me know how do you want it to be changed.

Haicheng


Repository:
  rL LLVM

https://reviews.llvm.org/D35850





More information about the llvm-commits mailing list