radeonsi: remove the unsafemath debug option
authorMarek Olšák <marek.olsak@amd.com>
Mon, 12 Aug 2019 23:58:45 +0000 (19:58 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Mon, 19 Aug 2019 21:23:38 +0000 (17:23 -0400)
unlikely to be used in the future

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
src/gallium/drivers/radeonsi/si_pipe.c
src/gallium/drivers/radeonsi/si_pipe.h
src/gallium/drivers/radeonsi/si_shader.c
src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c

index 6d9cce2619b6ce841d4bcc9ddc6b58037adf1b20..4a972c43189a1fabdbe029df53ce0dcd671bb2cb 100644 (file)
@@ -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) |                        \
index ddc1ce0c6def4323faf28b55308308e8e7884461..7fd13cfa9e780b411eb74ba638de627af1e3ff25 100644 (file)
@@ -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,
index f7087c1adca9950905baa2deb36eb86251630740..ea749becdde2aaddb6739f1cabcffcf3daaf9ec8 100644 (file)
@@ -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,
index e51250c2dacaec349f1851916a211bf293e9817d..2c1b3ebba77c9427325388dbc34ea2652228523d 100644 (file)
@@ -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;