[all-commits] [llvm/llvm-project] de9228: [LoopDeletion] Break backedge if we can prove that...
max-azul via All-commits
all-commits at lists.llvm.org
Fri Jun 18 03:32:32 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: de92287cf8d1b07516b7e006a54529f174d4f5ef
https://github.com/llvm/llvm-project/commit/de92287cf8d1b07516b7e006a54529f174d4f5ef
Author: Max Kazantsev <mkazantsev at azul.com>
Date: 2021-06-18 (Fri, 18 Jun 2021)
Changed paths:
M llvm/lib/Transforms/Scalar/LoopDeletion.cpp
M llvm/test/Transforms/LoopDeletion/eval_first_iteration.ll
M llvm/test/Transforms/LoopDeletion/unreachable-loops.ll
M llvm/test/Transforms/LoopDeletion/zero-btc.ll
Log Message:
-----------
[LoopDeletion] Break backedge if we can prove that the loop is exited on 1st iteration (try 3)
This patch handles one particular case of one-iteration loops for which SCEV
cannot straightforwardly prove BECount = 1. The idea of the optimization is to
symbolically execute conditional branches on the 1st iteration, moving in topoligical
order, and only visiting blocks that may be reached on the first iteration. If we find out
that we never reach header via the latch, then the backedge can be broken.
This implementation uses InstSimplify. SCEV version was rejected due to high
compile time impact.
Differential Revision: https://reviews.llvm.org/D102615
Reviewed By: nikic
More information about the All-commits
mailing list