-
Notifications
You must be signed in to change notification settings - Fork 393
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement a helper to evaluate a node to a condition register
In certain evaluators (e.g. *select), a selector value needs to be used as a condition in ICF. Previously, compare nodes would need to be evaluated to a GPR, then the GPR would be compared against 0. This was obviously inefficient, since it's possible to evaluate most comparisons directly to a condition register in 1-2 instructions. Some evaluators had special handling for this, but this handling was not uniform and would frequently miss corner cases. To address this and allow for better optimization opportunities, a new helper has been added which evaluates a node to a condition register and returns the condition which is true if the node was non-zero. For compare nodes, the comparison will be performed directly into a condition register. For other types of nodes, the old behaviour of evaluating the node to a GPR and comparing that against 0 will be used. Signed-off-by: Ben Thomas <ben@benthomas.ca>
- Loading branch information
1 parent
f0d0291
commit 5ed32ed
Showing
1 changed file
with
138 additions
and
0 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