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

Yevgeny Rouban via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 9 20:45:04 PDT 2019


yrouban added a comment.

In D63058#1535591 <https://reviews.llvm.org/D63058#1535591>, @lebedev.ri wrote:

> 2 questions, since i've read through the diff:
>
> 1. will this pick the smallest cost, or the first negative cost?
> 2. is this missing some abstraction? maybe `InlineResult Result` should be some wrapper that should be assigned-to, that will internally only accept the new value if it's better than what it currently has,


1. Not the smallest cost, but the first negative result with its message.
2. I think such an abstraction would not be much shorter: Result = InlineResult::FirstNegative(Result, expression)


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