[PATCH] D110922: [LoopPeel] Peel loops with deoptimizing exits

Dmitry Makogon via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 1 04:59:35 PDT 2021


dmakogon created this revision.
dmakogon added a reviewer: mkazantsev.
Herald added subscribers: zzheng, hiraditya.
dmakogon requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Added support for peeling loops with "deoptimizing" exits - such exits that it or any of its children (or any of their children, etc) either has a @llvm.experimental.deoptimize call
 prior to the terminating return instruction of this basic block or is terminated with unreachable. All blocks in the the sequence must have a single predecessor, maybe except for the last one. 
Previously we only checked the exit block for being deoptimizing. Now we check if the last reachable block from the exit is deoptimizing.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D110922

Files:
  llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h
  llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
  llvm/lib/Transforms/Utils/LoopPeel.cpp
  llvm/test/Transforms/LoopUnroll/peel-multiple-unreachable-exits.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110922.376477.patch
Type: text/x-patch
Size: 10389 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211001/1d06aed7/attachment.bin>


More information about the llvm-commits mailing list