[all-commits] [llvm/llvm-project] 8307f6: [LoopPredication] Insert assumes of conditions of ...

Dmitry Makogon via All-commits all-commits at lists.llvm.org
Fri Oct 7 02:10:51 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8307f6c854b64d00bac3d621917ff11bec1afb32
      https://github.com/llvm/llvm-project/commit/8307f6c854b64d00bac3d621917ff11bec1afb32
  Author: Dmitry Makogon <d.makogon at g.nsu.ru>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M llvm/lib/Transforms/Scalar/LoopPredication.cpp
    M llvm/test/Transforms/LoopPredication/assumes.ll
    M llvm/test/Transforms/LoopPredication/basic.ll
    M llvm/test/Transforms/LoopPredication/basic_widenable_branch_guards.ll
    M llvm/test/Transforms/LoopPredication/invariant_load.ll
    M llvm/test/Transforms/LoopPredication/nested.ll
    M llvm/test/Transforms/LoopPredication/profitability.ll
    M llvm/test/Transforms/LoopPredication/reverse.ll
    M llvm/test/Transforms/LoopPredication/visited.ll
    M llvm/test/Transforms/LoopPredication/widened.ll

  Log Message:
  -----------
  [LoopPredication] Insert assumes of conditions of predicated guards

As LoopPredication performs non-equivalent transforms removing some
checks from loops, other passes may not be able to perform transforms
they'd be able to do if the checks were left in loops.

This patch makes LoopPredication insert assumes of the replaced
conditions either after a guard call or in the true block of
widenable condition branch.

Differential Revision: https://reviews.llvm.org/D135354




More information about the All-commits mailing list