[all-commits] [llvm/llvm-project] dd6bb3: [LoopDeletion] Break backedge of loops when known ...

Philip Reames via All-commits all-commits at lists.llvm.org
Mon Jan 4 09:25:36 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: dd6bb367d19e3bf18353e40de54d35480999a930
      https://github.com/llvm/llvm-project/commit/dd6bb367d19e3bf18353e40de54d35480999a930
  Author: Philip Reames <listmail at philipreames.com>
  Date:   2021-01-04 (Mon, 04 Jan 2021)

  Changed paths:
    M llvm/include/llvm/Transforms/Utils/LoopUtils.h
    M llvm/lib/Transforms/Scalar/LoopDeletion.cpp
    M llvm/lib/Transforms/Utils/LoopUtils.cpp
    M llvm/test/Transforms/IndVarSimplify/X86/pr45360.ll
    M llvm/test/Transforms/IndVarSimplify/exit_value_test2.ll
    M llvm/test/Transforms/LoopDeletion/update-scev.ll
    A llvm/test/Transforms/LoopDeletion/zero-btc.ll

  Log Message:
  -----------
  [LoopDeletion] Break backedge of loops when known not taken

The basic idea is that if SCEV can prove the backedge isn't taken, we can go ahead and get rid of the backedge (and thus the loop) while leaving the rest of the control in place. This nicely handles cases with dispatch between multiple exits and internal side effects.

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




More information about the All-commits mailing list