[PATCH] D51207: Introduce llvm.experimental.widenable_condition intrinsic

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 29 19:46:26 PST 2018


mkazantsev added a comment.

In D51207#1312345 <https://reviews.llvm.org/D51207#1312345>, @apilipenko wrote:

> One of the alternatives naming schemes which was discussed is to call this intrinsic `should_deoptimize`. In this case the meaning of the returned value is inverted, so we need to or it with the condition which we want to widen.


Current definition in LangRef gives it much wider use cases than this. The point is, we have no obligation to *only* use this intrinsic in `and` condition with deopt in one of branches. For example, this usage is legit:

  if (wc()) {
    // Apply some solution that is fast on small data
  } else {
    // Apply another alternative solution that is fast on big data
  }

No deoptimize at all, but it is OK to make various optimizations that will play with heuristics when to choose which.


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

https://reviews.llvm.org/D51207





More information about the llvm-commits mailing list