radeonsi: raise the alignment of LDS memory for compute shaders

This implies that the memory will always be at address 0, which allows
LLVM to generate slightly better code.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
Nicolai Hähnle 2019-05-04 12:37:36 +02:00 committed by Marek Olšák
parent 33be5ad8a3
commit aa737e8580

View file

@ -2217,7 +2217,7 @@ void si_declare_compute_memory(struct si_shader_context *ctx)
LLVMArrayType(ctx->i8, lds_size),
"compute_lds",
AC_ADDR_SPACE_LDS);
LLVMSetAlignment(var, 4);
LLVMSetAlignment(var, 64 * 1024);
ctx->ac.lds = LLVMBuildBitCast(ctx->ac.builder, var, i8p, "");
}