[all-commits] [llvm/llvm-project] d72750: [SimplifyCFG] Remove one-use limitation in FoldCon...

Nikita Popov via All-commits all-commits at lists.llvm.org
Wed Apr 20 06:56:36 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d727505e40cde2ec5f8e9f4dc2220503f2b1863a
      https://github.com/llvm/llvm-project/commit/d727505e40cde2ec5f8e9f4dc2220503f2b1863a
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-04-20 (Wed, 20 Apr 2022)

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

  Log Message:
  -----------
  [SimplifyCFG] Remove one-use limitation in FoldCondBranchOnPHI()

BlockIsSimpleEnoughToThreadThrough() already checks that the phi
(and all other instructions) are not used outside the block, so
this one-use check is not necessary for legality. I also don't
see any reason why it would be necessary for profitability (in
fact, those extra uses will be replaced with constants, which
should be generally profitable).




More information about the All-commits mailing list