-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
After optimising an instruction, rewrite all of its operands.
Previously we only picked up results from the analyser if we performed other optimisations. So imagine we had this: ``` %3: i8 = ... %4: i1 = eq %3, 7 ... call f(%3) ``` then previously the call wouldn't become `f(7i8)` but would stay as `f(%3)`. This commit rewrites *every* instruction so that we pick up all the results of the analyser. We could do this more efficiently (e.g. it's not worth rewriting instructions we've already optimised), but this is good enough for now, and it leads to a meaningful difference e.g. about a 4% improvement on big_loop.
- Loading branch information
Showing
2 changed files
with
43 additions
and
16 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