[all-commits] [llvm/llvm-project] dc9690: [SimplifyCFG] Thread all predecessors with same va...

Nikita Popov via All-commits all-commits at lists.llvm.org
Tue Jul 5 05:34:17 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: dc969061c68e62328607d68215ed8b9ef4a1e4b1
      https://github.com/llvm/llvm-project/commit/dc969061c68e62328607d68215ed8b9ef4a1e4b1
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-07-05 (Tue, 05 Jul 2022)

  Changed paths:
    M llvm/lib/Transforms/Utils/SimplifyCFG.cpp
    M llvm/test/Transforms/SimplifyCFG/jump-threading.ll
    M llvm/test/Transforms/SimplifyCFG/pr55765.ll

  Log Message:
  -----------
  [SimplifyCFG] Thread all predecessors with same value at once

If there are multiple predecessors that have the same condition
value (and thus same "real destination"), these were previously
handled by copying the threaded block for each predecessor.
Instead, we can reuse one block for all of them. This makes the
behavior of SimplifyCFG's jump threading match that of the
actual JumpThreading pass.

This also avoids the infinite combine loop reported in:
https://reviews.llvm.org/D124159#3624387




More information about the All-commits mailing list