From: Marek Olšák Date: Mon, 12 Aug 2019 23:58:45 +0000 (-0400) Subject: radeonsi: remove the unsafemath debug option X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5d37194d43a13aca19291dc8596417b98b38d3c0;p=mesa.git radeonsi: remove the unsafemath debug option unlikely to be used in the future Reviewed-by: Pierre-Eric Pelloux-Prayer --- diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c index 6d9cce2619b..4a972c43189 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.c +++ b/src/gallium/drivers/radeonsi/si_pipe.c @@ -59,7 +59,6 @@ static const struct debug_named_value debug_options[] = { { "preoptir", DBG(PREOPT_IR), "Print the LLVM IR before initial optimizations" }, /* Shader compiler options the shader cache should be aware of: */ - { "unsafemath", DBG(UNSAFE_MATH), "Enable unsafe math shader optimizations" }, { "sisched", DBG(SI_SCHED), "Enable LLVM SI Machine Instruction Scheduler." }, { "gisel", DBG(GISEL), "Enable LLVM global instruction selector." }, { "w32ge", DBG(W32_GE), "Use Wave32 for vertex, tessellation, and geometry shaders." }, @@ -872,7 +871,6 @@ static void si_disk_cache_create(struct si_screen *sscreen) #define ALL_FLAGS (DBG(FS_CORRECT_DERIVS_AFTER_KILL) | \ DBG(SI_SCHED) | \ DBG(GISEL) | \ - DBG(UNSAFE_MATH) | \ DBG(W32_GE) | \ DBG(W32_PS) | \ DBG(W32_CS) | \ diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h index ddc1ce0c6de..7fd13cfa9e7 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.h +++ b/src/gallium/drivers/radeonsi/si_pipe.h @@ -145,7 +145,6 @@ enum { /* Shader compiler options the shader cache should be aware of: */ DBG_FS_CORRECT_DERIVS_AFTER_KILL, - DBG_UNSAFE_MATH, DBG_SI_SCHED, DBG_GISEL, DBG_W32_GE, diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index f7087c1adca..ea749becdde 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -4459,22 +4459,6 @@ void si_create_function(struct si_shader_context *ctx, LLVMAddTargetDependentFunctionAttr(ctx->main_fn, "no-signed-zeros-fp-math", "true"); - - if (ctx->screen->debug_flags & DBG(UNSAFE_MATH)) { - /* These were copied from some LLVM test. */ - LLVMAddTargetDependentFunctionAttr(ctx->main_fn, - "less-precise-fpmad", - "true"); - LLVMAddTargetDependentFunctionAttr(ctx->main_fn, - "no-infs-fp-math", - "true"); - LLVMAddTargetDependentFunctionAttr(ctx->main_fn, - "no-nans-fp-math", - "true"); - LLVMAddTargetDependentFunctionAttr(ctx->main_fn, - "unsafe-fp-math", - "true"); - } } static void declare_streamout_params(struct si_shader_context *ctx, diff --git a/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c b/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c index e51250c2dac..2c1b3ebba77 100644 --- a/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c +++ b/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c @@ -967,13 +967,10 @@ void si_llvm_context_init(struct si_shader_context *ctx, ctx->screen = sscreen; ctx->compiler = compiler; - enum ac_float_mode float_mode = - sscreen->debug_flags & DBG(UNSAFE_MATH) ? - AC_FLOAT_MODE_UNSAFE_FP_MATH : - AC_FLOAT_MODE_NO_SIGNED_ZEROS_FP_MATH; - ac_llvm_context_init(&ctx->ac, compiler, sscreen->info.chip_class, - sscreen->info.family, float_mode, wave_size); + sscreen->info.family, + AC_FLOAT_MODE_NO_SIGNED_ZEROS_FP_MATH, + wave_size); ctx->gallivm.context = ctx->ac.context; ctx->gallivm.module = ctx->ac.module;