From 5a94f15aa769cc090817c5dce2b98fa91d7e2110 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Mon, 9 Apr 2018 18:36:58 -0400 Subject: [PATCH] radeonsi: use si_compiler::triple in si_llvm_optimize_module MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Timothy Arceri Tested-by: Benedikt Schemmer Reviewed-by: Nicolai Hähnle --- src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c b/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c index cad81487d7e..f354417b89e 100644 --- a/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c +++ b/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c @@ -1213,7 +1213,6 @@ void si_llvm_create_func(struct si_shader_context *ctx, void si_llvm_optimize_module(struct si_shader_context *ctx) { struct gallivm_state *gallivm = &ctx->gallivm; - const char *triple = LLVMGetTarget(gallivm->module); LLVMTargetLibraryInfoRef target_library_info; /* Dump LLVM IR before any optimization passes */ @@ -1224,7 +1223,8 @@ void si_llvm_optimize_module(struct si_shader_context *ctx) /* Create the pass manager */ gallivm->passmgr = LLVMCreatePassManager(); - target_library_info = gallivm_create_target_library_info(triple); + target_library_info = + gallivm_create_target_library_info(ctx->compiler->triple); LLVMAddTargetLibraryInfo(target_library_info, gallivm->passmgr); if (si_extra_shader_checks(ctx->screen, ctx->type)) -- 2.30.2