[Mesa-dev] [PATCH 15/24] radeonsi: set noalias on input shader pointers

Marek Olšák maraeo at gmail.com
Sat Feb 25 23:58:13 UTC 2017


From: Marek Olšák <marek.olsak at amd.com>

---
 src/gallium/drivers/radeonsi/si_shader.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index caff95b..699fefd 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -5146,20 +5146,22 @@ static void si_create_function(struct si_shader_context *ctx,
 		/* The combination of:
 		 * - ByVal
 		 * - dereferenceable
 		 * - invariant.load
 		 * allows the optimization passes to move loads and reduces
 		 * SGPR spilling significantly.
 		 */
 		if (LLVMGetTypeKind(LLVMTypeOf(P)) == LLVMPointerTypeKind) {
 			lp_add_function_attr(ctx->gallivm.context, ctx->main_fn,
                                              i + 1, LP_FUNC_ATTR_BYVAL);
+			lp_add_function_attr(ctx->gallivm.context, ctx->main_fn,
+					     i + 1, LP_FUNC_ATTR_NOALIAS);
 			lp_add_attr_dereferenceable(P, UINT64_MAX);
 		} else
 			lp_add_function_attr(ctx->gallivm.context, ctx->main_fn,
                                              i + 1, LP_FUNC_ATTR_INREG);
 	}
 
 	LLVMAddTargetDependentFunctionAttr(ctx->main_fn,
 					   "no-signed-zeros-fp-math",
 					   "true");
 
-- 
2.7.4



More information about the mesa-dev mailing list