diff options
author | Samuel Pitoiset <[email protected]> | 2018-01-24 23:26:18 +0100 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2018-01-26 12:14:28 +0100 |
commit | b453f38a47d12fb5600472367f0bde2d6a403098 (patch) | |
tree | f81610f1a9faaf0cb9eb3eacb86218932e75740d /src/amd/common | |
parent | 310d17fcf17bdeb897f12b4577f8faf3abba9e77 (diff) |
ac/nir: set the noalias attribute on input pointers
This attribute is similar to the definition of restrict in
C99 and it might help LLVM.
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/common')
-rw-r--r-- | src/amd/common/ac_nir_to_llvm.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index 5b8c346d005..6833439cc12 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -326,6 +326,7 @@ create_llvm_function(LLVMContextRef ctx, LLVMModuleRef module, if (args->array_params_mask & (1 << i)) { LLVMValueRef P = LLVMGetParam(main_function, i); ac_add_function_attr(ctx, main_function, i + 1, AC_FUNC_ATTR_BYVAL); + ac_add_function_attr(ctx, main_function, i + 1, AC_FUNC_ATTR_NOALIAS); ac_add_attr_dereferenceable(P, UINT64_MAX); } else { |