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

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 7 00:50:33 PDT 2018


mkazantsev marked 3 inline comments as done.
mkazantsev added inline comments.


================
Comment at: include/llvm/Transforms/Scalar/ExplicifyGuards.h:1
+//===--- ExplicifyGuards.h - Turn guard intrinsics into guard branches ----===//
+//
----------------
reames wrote:
> I'm not actively objecting to the structure here, but this really just feels like another form of guard lowering.  Maybe if would be better to reuse the existing implementation and just have a parameter to control which form we're lowing to?  LowerGuards vs LowerGuardsToWidennableConds?
I had another model in my head. This pass will make guards explicit, but these explicit guards are still guards (i.e. they can be widened). LowerGuards's comments states:

  // This pass lowers the llvm.experimental.guard intrinsic to a conditional call
  // to @llvm.experimental.deoptimize.  Once this happens, the guard can no longer
  // be widened.

I don't want the semantics of LowerGuards be changed. My plan was to teach it to turn `widenable_condition` calls to `true`, so that we preserve the invariant "no widening is possible after LowerGuards".


https://reviews.llvm.org/D51207





More information about the llvm-commits mailing list