[PATCH] D63058: [InlineCost] Fix bug 42084: return the first negative result

Yevgeny Rouban via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 14 00:43:51 PDT 2019


yrouban added a comment.

In D63058#1537270 <https://reviews.llvm.org/D63058#1537270>, @chandlerc wrote:

> I think this is somewhat the wrong approach.
>  I think we need to widen the interface a bit to return two pieces of information instead of one:
>
> 1. The highest cost computed
> 2. Any inline-blocking construct encountered And we should phrase #2 as a bitmask so that we can return multiple things in it. One of them can be that we exceeded the threshold, another can be any terminal condition we additionally reached like recursion. I think this will also make the code more clear as we won't be throwing away any information at any step.


In general I agree with this approach. But the bigger change it needs the stronger intention I have to fix the bug with a minimal change and to develop the feature as another separate patch. One issue bothers me: results of the InlineCost analyzer will depend on the flag //ComputeFullInlineCost//. Negative or positive decision will persist but the message and highest computed cost will be changing.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D63058





More information about the llvm-commits mailing list