aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineBasicBlock.cpp
diff options
context:
space:
mode:
authorMatthias Springer <me@m-sp.org>2023-11-16 11:47:57 +0900
committerGitHub <noreply@github.com>2023-11-16 11:47:57 +0900
commit96901f1b02602589d2adc8de48671529f4090dde (patch)
treecca0e4e05554891be12a60d4da7ad47095d85fb4 /llvm/lib/CodeGen/MachineBasicBlock.cpp
parent212a60ec37322f853e91e171b305479b1abff2f2 (diff)
downloadllvm-96901f1b02602589d2adc8de48671529f4090dde.zip
llvm-96901f1b02602589d2adc8de48671529f4090dde.tar.gz
llvm-96901f1b02602589d2adc8de48671529f4090dde.tar.bz2
[mlir][SCF] Do not peel already peeled loops (#71900)
Loop peeling is not beneficial if the step size already divides "ub - lb". There are currently some simple checks to prevent peeling in such cases when lb, ub, step are constants. This commit adds support for IR that is the result of loop peeling in the general case; i.e., lb, ub, step do not necessarily have to be constants. This change adds a new affine_map simplification rule for semi-affine maps that appear during loop peeling and are guaranteed to evaluate to a constant zero. Affine maps such as: ``` (1) affine_map<()[ub, step] -> ((ub - ub mod step) mod step) (2) affine_map<()[ub, lb, step] -> ((ub - (ub - lb) mod step - lb) mod step) (3) ^ may contain additional summands ``` Other affine maps with modulo expressions are not supported by the new simplification rule. This fixes #71469.
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
0 files changed, 0 insertions, 0 deletions