From: Marek Olšák Date: Mon, 9 Apr 2018 22:36:58 +0000 (-0400) Subject: radeonsi: use si_compiler::triple in si_llvm_optimize_module X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5a94f15aa769cc090817c5dce2b98fa91d7e2110;p=mesa.git radeonsi: use si_compiler::triple in si_llvm_optimize_module Reviewed-by: Timothy Arceri Tested-by: Benedikt Schemmer Reviewed-by: Nicolai Hähnle --- 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))