forked from google/skia
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reorder commutative ops involving constant variables or XOR.
Previously, we would reorder `2 * x` into `x * 2` (since the latter can use an immediate op), but we would not have reordered `PI * x` because `PI` is a constant variable, not a Literal. We now detect those cases and rewrite as `x * PI` (allowing us to save an instruction via `mul_imm_float`). Also, we now apply commutative reordering to ^ and ^^, since the xor op now has an immediate-mode version. Change-Id: I1e1da2d31e8df48ec4c57c544dcc5bca7944f25e Reviewed-on: https://skia-review.googlesource.com/c/skia/+/684099 Commit-Queue: Brian Osman <[email protected]> Auto-Submit: John Stiles <[email protected]> Reviewed-by: Brian Osman <[email protected]>
- Loading branch information
1 parent
a21a30c
commit 0102755
Showing
3 changed files
with
12 additions
and
11 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