-
Notifications
You must be signed in to change notification settings - Fork 11.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[mlir] add canonicalization patterns for trivial SCF 'for' and 'if'
Add canoncalization patterns to remove zero-iteration 'for' loops, replace single-iteration 'for' loops with their bodies; remove known-false conditionals with no 'else' branch and replace conditionals with known value by the respective region. Although similar transformations are performed at the CFG level, not all flows reach that level, e.g., the GPU flow may want to remove single-iteration loops before deciding on loop mapping to thread dimensions. Reviewed By: herhut Differential Revision: https://reviews.llvm.org/D91865
- Loading branch information
Showing
2 changed files
with
198 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters