mesa/src/amd/llvm
Samuel Pitoiset ba2ec1f369 ac/nir: use llvm.amdgcn.rcp in ac_build_fdiv()
Instead of emitting 1.0 / x which includes a slow division that
LLVM doesn't always optimize even if the metadata is correctly set.

No pipeline-db changes with VEGA10/LLVM 9.

pipeline-db (VEGA10/LLVM 10):
Totals from affected shaders:
SGPRS: 6672 -> 6672 (0.00 %)
VGPRS: 6652 -> 6652 (0.00 %)
Spilled SGPRs: 0 -> 0 (0.00 %)
Spilled VGPRs: 0 -> 0 (0.00 %)
Code Size: 561780 -> 561692 (-0.02 %) bytes
Max Waves: 1043 -> 1043 (0.00 %)

pipeline-db (VEGA10/LLVM 11 - 92744f62478):
Totals from affected shaders:
SGPRS: 84608 -> 83768 (-0.99 %)
VGPRS: 106768 -> 106636 (-0.12 %)
Spilled SGPRs: 1625 -> 1713 (5.42 %)
Spilled VGPRs: 0 -> 0 (0.00 %)
Code Size: 10850936 -> 10726712 (-1.14 %) bytes
Max Waves: 3152 -> 3180 (0.89 %)

LLVM 11 (master) is more affected than previous versions, but
based on the small impact with LLVM 9/10, I decided to emit it
unconditionally.

Cc: 20.0 <mesa-stable@lists.freedesktop.org>
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4326>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4326>
2020-03-27 08:05:43 +01:00
..
ac_llvm_build.c ac/nir: use llvm.amdgcn.rcp in ac_build_fdiv() 2020-03-27 08:05:43 +01:00
ac_llvm_build.h ac/nir: use llvm.amdgcn.rcp in ac_build_fdiv() 2020-03-27 08:05:43 +01:00
ac_llvm_cull.c ac/cull: don't read Position.Z if it's not needed for culling 2020-01-15 15:06:20 -05:00
ac_llvm_cull.h
ac_llvm_helper.cpp radv: remove useless RADV_DEBUG=unsafemath debug option 2019-11-15 09:07:34 +01:00
ac_llvm_util.c ac: don't set old denormals flags with LLVM >= 11 2020-03-17 20:47:48 +00:00
ac_llvm_util.h radeonsi: remove AMD_DEBUG=sisched option 2020-03-06 11:35:12 +01:00
ac_nir_to_llvm.c ac/nir: use llvm.amdgcn.rsq for nir_op_frsq 2020-03-27 07:45:47 +01:00
ac_nir_to_llvm.h radeonsi/nir: don't run si_nir_opts again if there is no change 2019-11-25 16:48:27 -05:00
ac_shader_abi.h amd: join emit_kill() from radv and radeonsi in ac_nir_to_llvm 2020-03-09 12:29:32 +00:00
meson.build