[all-commits] [llvm/llvm-project] d46d96: [BBUtils] Don't add 'then' block to a loop if it's...
Dmitry Makogon via All-commits
all-commits at lists.llvm.org
Mon Jun 19 06:26:11 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d46d9689f7c3fe16010cd07761858a6392239b3f
https://github.com/llvm/llvm-project/commit/d46d9689f7c3fe16010cd07761858a6392239b3f
Author: Dmitry Makogon <d.makogon at g.nsu.ru>
Date: 2023-06-19 (Mon, 19 Jun 2023)
Changed paths:
M llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
M llvm/test/Transforms/SimpleLoopUnswitch/guards.ll
M llvm/test/Transforms/SimpleLoopUnswitch/nontrivial-unswitch-skip-selects-in-guards.ll
Log Message:
-----------
[BBUtils] Don't add 'then' block to a loop if it's terminated with unreachable
SplitBlockAndInsertIfThen utility creates two new blocks,
they're called ThenBlock and Tail (true and false destinations of a conditional
branch correspondingly). The function has a bool parameter Unreachable,
and if it's set, then ThenBlock is terminated with an unreachable.
At the end of the function the new blocks are added to the loop of the split
block. However, in case ThenBlock is terminated with an unreachable,
it cannot belong to any loop.
Differential Revision: https://reviews.llvm.org/D152434
More information about the All-commits
mailing list