[all-commits] [llvm/llvm-project] 90310d: [LoopUnroll] Use changeToUnreachable() (NFC)

Nikita Popov via All-commits all-commits at lists.llvm.org
Fri May 28 15:11:43 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 90310dfff8fd17b0cabdee1fd72d675e5eb2aa78
      https://github.com/llvm/llvm-project/commit/90310dfff8fd17b0cabdee1fd72d675e5eb2aa78
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2021-05-29 (Sat, 29 May 2021)

  Changed paths:
    M llvm/lib/Transforms/Utils/LoopUnroll.cpp

  Log Message:
  -----------
  [LoopUnroll] Use changeToUnreachable() (NFC)

When fulling unrolling with a non-latch exit, the latch block is
folded to unreachable. Replace this folding with the existing
changeToUnreachable() helper, rather than performing it manually.

This also moves the fold to happen after the manual DT update
for exit blocks. I believe this is correct in that the conversion
of an unconditional backedge into unreachable should not affect
the DT at all.

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




More information about the All-commits mailing list