[PATCH] D102234: [SimpleLoopBoundSplit] Split Bound of Loop which has conditional branch with IV

JinGu Kang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 11 05:46:37 PDT 2021


jaykang10 created this revision.
jaykang10 added reviewers: reames, mkazantsev, sanwou01.
Herald added subscribers: hiraditya, mgorny.
jaykang10 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This pass transforms loops that contain a conditional branch with induction variable. In order to make this pass as simple as possible, it handles only a conditional branch with condition which is mainly "AddRec < Bound" and its variants. For example, it transforms left code to right code:

                              newbound1 = min(n, c)
                              newbound2 = max(n, c)
  while (iv < n) {            while(iv < newbound1) {
    A                           A
    if (iv < c)                 B
      B                         C
    C                         }
  }                           iv = newbound1
                              while (iv < newbound2) {
                                A
                                C
                              }


https://reviews.llvm.org/D102234

Files:
  llvm/include/llvm/Transforms/Scalar/SimpleLoopBoundSplit.h
  llvm/lib/Passes/PassBuilder.cpp
  llvm/lib/Passes/PassRegistry.def
  llvm/lib/Transforms/Scalar/CMakeLists.txt
  llvm/lib/Transforms/Scalar/SimpleLoopBoundSplit.cpp
  llvm/test/Transforms/SimpleLoopBoundSplit/simple-loop-bound-split.ll
  llvm/utils/gn/secondary/llvm/lib/Transforms/Scalar/BUILD.gn

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102234.344375.patch
Type: text/x-patch
Size: 38175 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210511/49cf587a/attachment.bin>


More information about the llvm-commits mailing list