[all-commits] [llvm/llvm-project] 653fa0: Do actual DCE in LoopUnroll (try 2)

Philip Reames via All-commits all-commits at lists.llvm.org
Fri May 14 10:47:17 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 653fa0b46ae34c06495b542414b704b30381cd02
      https://github.com/llvm/llvm-project/commit/653fa0b46ae34c06495b542414b704b30381cd02
  Author: Philip Reames <listmail at philipreames.com>
  Date:   2021-05-14 (Fri, 14 May 2021)

  Changed paths:
    M llvm/lib/Transforms/Utils/LoopUnroll.cpp
    M llvm/test/Transforms/LoopUnroll/AArch64/full-unroll-trip-count-upper-bound.ll
    M llvm/test/Transforms/LoopUnroll/nonlatchcondbr.ll
    M llvm/test/Transforms/LoopUnroll/optsize-loop-size.ll
    M llvm/test/Transforms/LoopUnroll/pr45939-peel-count-and-complete-unroll.ll
    M llvm/test/Transforms/LoopUnroll/scevunroll.ll
    M llvm/test/Transforms/LoopUnroll/unroll-header-exiting-with-phis.ll
    M llvm/test/Transforms/LoopUnroll/unroll-unconditional-latch.ll
    M llvm/test/Transforms/LoopUnrollAndJam/unroll-and-jam.ll

  Log Message:
  -----------
  Do actual DCE in LoopUnroll (try 2)

Recommitting after addressing a missed review comment, and updating an aarch64 test I'd missed.

LoopUnroll does a limited DCE pass after unrolling, but if you have a chain of dead instructions, it only deletes the last one. Improve the code to recursively delete all trivially dead instructions.

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




More information about the All-commits mailing list