[all-commits] [llvm/llvm-project] dfb7a9: [LoopPred] Robustly handle partially unswitched loops

Philip Reames via All-commits all-commits at lists.llvm.org
Thu Nov 21 15:44:41 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: dfb7a9091affce6e5a8fdb017b4e2d58675bb9b0
      https://github.com/llvm/llvm-project/commit/dfb7a9091affce6e5a8fdb017b4e2d58675bb9b0
  Author: Philip Reames <listmail at philipreames.com>
  Date:   2019-11-21 (Thu, 21 Nov 2019)

  Changed paths:
    M llvm/lib/Transforms/Scalar/LoopPredication.cpp
    M llvm/test/Transforms/LoopPredication/predicate-exits.ll

  Log Message:
  -----------
  [LoopPred] Robustly handle partially unswitched loops

We may end up with a case where we have a widenable branch above the loop, but not all widenable branches within the loop have been removed.  Since a widenable branch inhibit SCEVs ability to reason about exit counts (by design), we have a tradeoff between effectiveness of this optimization and allowing future widening of the branches within the loop.  LoopPred is thought to be one of the most important optimizations for range check elimination, so let's pay the cost.




More information about the All-commits mailing list