Skip to content
Commit 59b23c4a authored by Abhishek Varma's avatar Abhishek Varma Committed by Alex Zinenko
Browse files

[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: default avatarAbhishek Varma <abhishek.varma@polymagelabs.com>

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D116923
parent 42fc05e0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment