gallium/radeon: simplify initialization of 64-bit gallivm builders
authorMarek Olšák <marek.olsak@amd.com>
Sun, 16 Oct 2016 23:51:53 +0000 (01:51 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 18 Oct 2016 16:41:03 +0000 (18:41 +0200)
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>
src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c

index 2d424d5ff2495d144eda3b70cf9dcd2a34500aba..c06eb3eba704495c4e5035ee3cbc2bf401e8e2a4 100644 (file)
@@ -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;