diff options
| author | Jason Ekstrand <jason.ekstrand@intel.com> | 2017-12-28 13:06:28 -0800 |
|---|---|---|
| committer | Jason Ekstrand <jason@jlekstrand.net> | 2018-12-13 17:49:48 +0000 |
| commit | 74492ebad9457679eb25d1a1159a674a988731d5 (patch) | |
| tree | 23f12a80c0ebc68ab3e792ae9baef75e025b58d6 /src/compiler/nir/meson.build | |
| parent | 090e28240795ce83ef63f2da768a80ca65b03ec7 (diff) | |
nir: Add a pass for lowering integer division by constants
It's a reasonably well-known fact in the world of compilers that integer
divisions by constants can be replaced by a multiply, an add, and some
shifts. This commit adds such an optimization to NIR for easiest case
of udiv. Other division operations will be added in following commits.
In order to provide some additional driver control, the pass takes a
minimum bit size to optimize.
Reviewed-by: Ian Romanick ian.d.romanick@intel.com
Diffstat (limited to 'src/compiler/nir/meson.build')
| -rw-r--r-- | src/compiler/nir/meson.build | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/compiler/nir/meson.build b/src/compiler/nir/meson.build index b0ca27cb70..5eb1df2a68 100644 --- a/src/compiler/nir/meson.build +++ b/src/compiler/nir/meson.build @@ -163,6 +163,7 @@ files_libnir = files( 'nir_opt_find_array_copies.c', 'nir_opt_gcm.c', 'nir_opt_global_to_local.c', + 'nir_opt_idiv_const.c', 'nir_opt_if.c', 'nir_opt_intrinsics.c', 'nir_opt_large_constants.c', |
