-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TIR][Transform] Optional data-flow analysis in RemoveNoOp (#13217)
* [TIR][Transform] Optional data-flow analysis in RemoveNoOp Previously, `RemoveNoOp` would remove statements that could be locally analyzed as having no effect (e.g. `For` with empty loop extents). This commit adds opt-in use of data-flow analysis to identify two types of statements that are no-ops based on their context: * Buffer stores that are overwritten without ever being read. ```python buf[i] = 5 # Overwritten by next statement buf[i] = 10 ``` * Storing a value that is already known to be present. ```python buf[0:16] = T.ramp(0, 16, 1) buf[5] = 5 # Previous load already stored this value ``` * Avoid dangling pointers in var_range_map_
- Loading branch information
1 parent
f5a102c
commit 101e3a4
Showing
6 changed files
with
796 additions
and
92 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
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
Oops, something went wrong.