[Mesa-dev] llvmpipe: Fix build after removal of deprecated attribute API

Submitted by Aaron Watry on Nov. 8, 2016, 3:55 a.m.

Details

Message ID 1478577314-5914-1-git-send-email-awatry@gmail.com
State New
Headers show
Series "llvmpipe: Fix build after removal of deprecated attribute API" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Aaron Watry Nov. 8, 2016, 3:55 a.m.
Applies on top of v2 of Tom's gallivm change.

Signed-off-by: Aaron Watry <awatry@gmail.com>
CC: Tom Stellard <thomas.stellard@amd.com>
CC: Jan Vesely <jan.vesely@rutgers.edu>
---
This fixes the build for me. I haven't done more than compile test this and run make check.

 src/gallium/drivers/llvmpipe/lp_state_fs.c    | 2 +-
 src/gallium/drivers/llvmpipe/lp_state_setup.c | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

Patch hide | download patch | download mbox

diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c
index 3428eed..9a288fe 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_fs.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c
@@ -2296,7 +2296,7 @@  generate_fragment(struct llvmpipe_context *lp,
     */
    for(i = 0; i < ARRAY_SIZE(arg_types); ++i)
       if(LLVMGetTypeKind(arg_types[i]) == LLVMPointerTypeKind)
-         LLVMAddAttribute(LLVMGetParam(function, i), LLVMNoAliasAttribute);
+         lp_add_function_attr(function, i + 1, "noalias", 7);
 
    context_ptr  = LLVMGetParam(function, 0);
    x            = LLVMGetParam(function, 1);
diff --git a/src/gallium/drivers/llvmpipe/lp_state_setup.c b/src/gallium/drivers/llvmpipe/lp_state_setup.c
index a57e2f0..dd1a9a0 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_setup.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_setup.c
@@ -624,8 +624,7 @@  set_noalias(LLVMBuilderRef builder,
    int i;
    for(i = 0; i < nr_args; ++i)
       if(LLVMGetTypeKind(arg_types[i]) == LLVMPointerTypeKind)
-         LLVMAddAttribute(LLVMGetParam(function, i),
-            LLVMNoAliasAttribute);
+         lp_add_function_attr(function, i + 1, "noalias", 7);
 }
 
 static void

Comments

On 08.11.2016 04:55, Aaron Watry wrote:
> Applies on top of v2 of Tom's gallivm change.
>
> Signed-off-by: Aaron Watry <awatry@gmail.com>
> CC: Tom Stellard <thomas.stellard@amd.com>
> CC: Jan Vesely <jan.vesely@rutgers.edu>
> ---
> This fixes the build for me. I haven't done more than compile test this and run make check.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>

Do you need somebody to push this for you?

Nicolai

>
>  src/gallium/drivers/llvmpipe/lp_state_fs.c    | 2 +-
>  src/gallium/drivers/llvmpipe/lp_state_setup.c | 3 +--
>  2 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c
> index 3428eed..9a288fe 100644
> --- a/src/gallium/drivers/llvmpipe/lp_state_fs.c
> +++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c
> @@ -2296,7 +2296,7 @@ generate_fragment(struct llvmpipe_context *lp,
>      */
>     for(i = 0; i < ARRAY_SIZE(arg_types); ++i)
>        if(LLVMGetTypeKind(arg_types[i]) == LLVMPointerTypeKind)
> -         LLVMAddAttribute(LLVMGetParam(function, i), LLVMNoAliasAttribute);
> +         lp_add_function_attr(function, i + 1, "noalias", 7);
>
>     context_ptr  = LLVMGetParam(function, 0);
>     x            = LLVMGetParam(function, 1);
> diff --git a/src/gallium/drivers/llvmpipe/lp_state_setup.c b/src/gallium/drivers/llvmpipe/lp_state_setup.c
> index a57e2f0..dd1a9a0 100644
> --- a/src/gallium/drivers/llvmpipe/lp_state_setup.c
> +++ b/src/gallium/drivers/llvmpipe/lp_state_setup.c
> @@ -624,8 +624,7 @@ set_noalias(LLVMBuilderRef builder,
>     int i;
>     for(i = 0; i < nr_args; ++i)
>        if(LLVMGetTypeKind(arg_types[i]) == LLVMPointerTypeKind)
> -         LLVMAddAttribute(LLVMGetParam(function, i),
> -            LLVMNoAliasAttribute);
> +         lp_add_function_attr(function, i + 1, "noalias", 7);
>  }
>
>  static void
>