[all-commits] [llvm/llvm-project] 59b23c: [MLIR][SCF] Remove loop invariant arguments of scf...
Abhishek Varma via All-commits
all-commits at lists.llvm.org
Thu Feb 3 08:13:40 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 59b23c4aecccd8a0687c71b3afc55fd233b935c2
https://github.com/llvm/llvm-project/commit/59b23c4aecccd8a0687c71b3afc55fd233b935c2
Author: Abhishek Varma <abhishek.varma at cerebras.net>
Date: 2022-02-03 (Thu, 03 Feb 2022)
Changed paths:
M mlir/lib/Dialect/SCF/SCF.cpp
M mlir/test/Dialect/SCF/canonicalize.mlir
Log Message:
-----------
[MLIR][SCF] Remove loop invariant arguments of scf.while
-- This commit adds a canonicalization pattern on scf.while to remove
the loop invariant arguments.
-- An argument is considered loop invariant if the iteration argument value is
the same as the corresponding one being yielded (at the same position) in both
the before/after block of scf.while.
-- For the arguments removed, their use within scf.while and their corresponding
scf.while's result are replaced with their corresponding initial value.
Signed-off-by: Abhishek Varma <abhishek.varma at polymagelabs.com>
Reviewed By: ftynse
Differential Revision: https://reviews.llvm.org/D116923
More information about the All-commits
mailing list