-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Substrait] Run CSE in emit deduplication patterns. (#838)
This commits adds calls to two patterns that may create common subexpressions during emit deduplication. By deduplicating their regions, field references to duplicated fields end up referring to the same field, thus creating common subexpressions. The patterns, thus, call CSE right away. This can, in the case of `project`, create duplicate *output* fields, which the remainder of the emit duplication pass can pick up. If CSE were not run as part of emit deduplication but as alternating passes, then each of the two passes could unlock optimization potential for the other, such that we'd need as many iterations of them as the longest use-def chain is long. Another design choice consists in calling CSE from an *existing* pattern. An alternative would be to call CSE in one or several decicated patterns but that would either require (1) to test for duplicate field references before application or (2) run CSE blindly and return `success()` iff that made changes. Signed-off-by: Ingo Müller <[email protected]>
- Loading branch information
1 parent
d9138c6
commit 5acf08e
Showing
3 changed files
with
19 additions
and
5 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