gallium/radeon: simplify radeon_llvm_emit_store for direct array addressing
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Mon, 8 Aug 2016 17:54:53 +0000 (19:54 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 17 Aug 2016 10:11:22 +0000 (12:11 +0200)
We can use the pointer stored in the temps array directly.

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c

index e084248920bc4147fab1298378937f956273a7fc..7b96a5847b5ddd5aab5f4b8ca9546eca80a71d1f 100644 (file)
@@ -631,16 +631,9 @@ void radeon_llvm_emit_store(struct lp_build_tgsi_context *bld_base,
 
                        case TGSI_FILE_TEMPORARY:
                        {
-                               LLVMValueRef array;
                                if (reg->Register.Index >= ctx->temps_count)
                                        continue;
-                               array = get_alloca_for_array(bld_base, reg->Register.File, reg->Register.Index);
 
-                               if (array) {
-                                       store_value_to_array(bld_base, value, reg->Register.File, chan_index, reg->Register.Index,
-                                                               NULL);
-                                       continue;
-                               }
                                temp_ptr = ctx->temps[ TGSI_NUM_CHANNELS * reg->Register.Index + chan_index];
                                if (tgsi_type_is_64bit(dtype))
                                        temp_ptr2 = ctx->temps[ TGSI_NUM_CHANNELS * reg->Register.Index + chan_index + 1];