[Mesa-dev] [PATCH 7/7] radeonsi: don't use the low-optimizing compiler on LLVM 9

Marek Olšák maraeo at gmail.com
Thu Jun 13 00:40:41 UTC 2019


From: Marek Olšák <marek.olsak at amd.com>

The compilation is faster on LLVM 9.
---
 src/gallium/drivers/radeonsi/si_pipe.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c
index 8527999645b..d2fd058f2cd 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -115,21 +115,22 @@ static const struct debug_named_value debug_options[] = {
 
 	DEBUG_NAMED_VALUE_END /* must be last */
 };
 
 static void si_init_compiler(struct si_screen *sscreen,
 			     struct ac_llvm_compiler *compiler)
 {
 	/* Only create the less-optimizing version of the compiler on APUs
 	 * predating Ryzen (Raven). */
 	bool create_low_opt_compiler = !sscreen->info.has_dedicated_vram &&
-				       sscreen->info.chip_class <= GFX8;
+				       sscreen->info.chip_class <= GFX8 &&
+				       HAVE_LLVM < 0x0900;
 
 	enum ac_target_machine_options tm_options =
 		(sscreen->debug_flags & DBG(SI_SCHED) ? AC_TM_SISCHED : 0) |
 		(sscreen->debug_flags & DBG(GISEL) ? AC_TM_ENABLE_GLOBAL_ISEL : 0) |
 		(sscreen->info.chip_class >= GFX9 ? AC_TM_FORCE_ENABLE_XNACK : 0) |
 		(sscreen->info.chip_class < GFX9 ? AC_TM_FORCE_DISABLE_XNACK : 0) |
 		(!sscreen->llvm_has_working_vgpr_indexing ? AC_TM_PROMOTE_ALLOCA_TO_SCRATCH : 0) |
 		(sscreen->debug_flags & DBG(CHECK_IR) ? AC_TM_CHECK_IR : 0) |
 		(create_low_opt_compiler ? AC_TM_CREATE_LOW_OPT : 0);
 
-- 
2.17.1



More information about the mesa-dev mailing list