-
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.
[Relax] Identify tuple unpack/repack in CanonicalizeBindings (#17313)
Prior to this commit, the `CanonicalizeBindings` pass could identify and simplify a value that had been packed into a tuple, then extracted from it. (e.g. Simplifying `tup = (x,y); z = tup[0]` into `z = x`.) However, it could not identify a value that had been expanded from a tuple, and then re-bundled. (e.g. Simplifying `new_tuple = (tup[0], tup[1])` into `new_tuple = tup`.) This commit updates `CanonicalizeBindings` to identify and remove unnecessary tuple unpacking/repacking.
- Loading branch information
1 parent
be8607d
commit 108a4e1
Showing
2 changed files
with
143 additions
and
20 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