[all-commits] [llvm/llvm-project] 2b089e: [SimplifyCFG] Try to merge edge block when threadi...

Nikita Popov via All-commits all-commits at lists.llvm.org
Mon Jun 20 01:29:48 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2b089e9ae0df0fa44831cc74253b55ea6d43cd41
      https://github.com/llvm/llvm-project/commit/2b089e9ae0df0fa44831cc74253b55ea6d43cd41
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-06-20 (Mon, 20 Jun 2022)

  Changed paths:
    M llvm/lib/Transforms/Utils/SimplifyCFG.cpp
    A llvm/test/Transforms/SimplifyCFG/pr55765.ll

  Log Message:
  -----------
  [SimplifyCFG] Try to merge edge block when threading (PR55765)

When threading, we always create a new block for the threaded edge
(even if the edge is not critical), which will later get folded back
into the predecessor if possible. Depending on precise processing
order, this separate block may break the detection of trivial
cycles in the threading code, which normally avoids infinite
threading of loops. Explicitly merge the created edge block into
the predecessor to avoid this.

Fixes https://github.com/llvm/llvm-project/issues/55765.

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




More information about the All-commits mailing list