python: Use the right function for the job
authorMathieu Bridon <bochecha@daitauha.fr>
Thu, 9 Aug 2018 08:27:19 +0000 (10:27 +0200)
committerDylan Baker <dylan@pnwbakers.com>
Thu, 9 Aug 2018 23:49:18 +0000 (16:49 -0700)
commitd9ca4a172e8e8a42217588ca1b83a7ceb5bf3f76
treea70fccee99267b2f5be7cda282d9cad35f77f471
parentb618d7ea59a4d7da9823e02ac5608a67fd99b332
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>
src/compiler/nir/nir_opt_algebraic.py