mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 23:30:10 +01:00
python: Use the right function for the job
The code was just reimplementing itertools.combinations_with_replacement in a less efficient way. This does change the order of the results slightly, but it should be ok. Signed-off-by: Mathieu Bridon <bochecha@daitauha.fr> Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
This commit is contained in:
parent
b618d7ea59
commit
d9ca4a172e
1 changed files with 1 additions and 1 deletions
|
|
@ -723,7 +723,7 @@ optimizations = [
|
|||
|
||||
invert = OrderedDict([('feq', 'fne'), ('fne', 'feq'), ('fge', 'flt'), ('flt', 'fge')])
|
||||
|
||||
for left, right in list(itertools.combinations(invert.keys(), 2)) + zip(invert.keys(), invert.keys()):
|
||||
for left, right in itertools.combinations_with_replacement(invert.keys(), 2):
|
||||
optimizations.append((('inot', ('ior(is_used_once)', (left, a, b), (right, c, d))),
|
||||
('iand', (invert[left], a, b), (invert[right], c, d))))
|
||||
optimizations.append((('inot', ('iand(is_used_once)', (left, a, b), (right, c, d))),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue