From 4967cacdfac58896e6b8b1e02bcd9704a01f33bf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= <marek.olsak@amd.com>
Date: Mon, 17 Oct 2016 01:51:53 +0200
Subject: gallium/radeon: simplify initialization of 64-bit gallivm builders
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Edward O'Callaghan <funfunctor@folklore1984.net>
---
 .../drivers/radeon/radeon_setup_tgsi_llvm.c        | 22 ++++------------------
 1 file changed, 4 insertions(+), 18 deletions(-)

(limited to 'src/gallium/drivers')

diff --git a/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c b/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c
index 2d424d5..c06eb3e 100644
--- a/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c
+++ b/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c
@@ -1068,24 +1068,10 @@ void radeon_llvm_context_init(struct radeon_llvm_context *ctx, const char *tripl
 	lp_build_context_init(&bld_base->base, &ctx->gallivm, type);
 	lp_build_context_init(&ctx->soa.bld_base.uint_bld, &ctx->gallivm, lp_uint_type(type));
 	lp_build_context_init(&ctx->soa.bld_base.int_bld, &ctx->gallivm, lp_int_type(type));
-	{
-		struct lp_type dbl_type;
-		dbl_type = type;
-		dbl_type.width *= 2;
-		lp_build_context_init(&ctx->soa.bld_base.dbl_bld, &ctx->gallivm, dbl_type);
-	}
-	{
-		struct lp_type dtype;
-		dtype = lp_uint_type(type);
-		dtype.width *= 2;
-		lp_build_context_init(&ctx->soa.bld_base.uint64_bld, &ctx->gallivm, dtype);
-	}
-	{
-		struct lp_type dtype;
-		dtype = lp_int_type(type);
-		dtype.width *= 2;
-		lp_build_context_init(&ctx->soa.bld_base.int64_bld, &ctx->gallivm, dtype);
-	}
+	type.width *= 2;
+	lp_build_context_init(&ctx->soa.bld_base.dbl_bld, &ctx->gallivm, type);
+	lp_build_context_init(&ctx->soa.bld_base.uint64_bld, &ctx->gallivm, lp_uint_type(type));
+	lp_build_context_init(&ctx->soa.bld_base.int64_bld, &ctx->gallivm, lp_int_type(type));
 
 	bld_base->soa = 1;
 	bld_base->emit_store = radeon_llvm_emit_store;
-- 
cgit v1.1