[Mesa-dev] [Bug 98652] AMD driver doesn't compile anymore after recent LLVM changes

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Nov 9 07:47:58 UTC 2016


https://bugs.freedesktop.org/show_bug.cgi?id=98652

            Bug ID: 98652
           Summary: AMD driver doesn't compile anymore after recent LLVM
                    changes
           Product: Mesa
           Version: git
          Hardware: Other
                OS: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Other
          Assignee: mesa-dev at lists.freedesktop.org
          Reporter: bero at lindev.ch
        QA Contact: mesa-dev at lists.freedesktop.org

The LLVMAttribute API has been removed from LLVM recently.
Mesa's src/amd/common/ac_nir_to_llvm.c still uses it, causing compile failures
when using current LLVM snapshots.

ac_nir_to_llvm.c:144:43: error: unknown type name 'LLVMAttribute'; did you mean
      'LLVMAttributeRef'?
                    unsigned param_count, LLVMAttribute attribs);
                                          ^~~~~~~~~~~~~
                                          LLVMAttributeRef                      
/usr/include/llvm-c/Types.h:116:40: note: 'LLVMAttributeRef' declared here
typedef struct LLVMOpaqueAttributeRef *LLVMAttributeRef;
                                       ^
ac_nir_to_llvm.c:230:4: error: implicit declaration of function
'LLVMAddAttribute' is
      invalid in C99 [-Werror,-Wimplicit-function-declaration]
                        LLVMAddAttribute(P, LLVMByValAttribute);
                        ^
ac_nir_to_llvm.c:230:24: error: use of undeclared identifier
'LLVMByValAttribute'; did you
      mean 'LLVMAddAttribute'?
                        LLVMAddAttribute(P, LLVMByValAttribute);
                                            ^~~~~~~~~~~~~~~~~~
                                            LLVMAddAttribute                    
ac_nir_to_llvm.c:230:4: note: 'LLVMAddAttribute' declared here
                        LLVMAddAttribute(P, LLVMByValAttribute);
                        ^
ac_nir_to_llvm.c:234:24: error: use of undeclared identifier
'LLVMInRegAttribute'
                        LLVMAddAttribute(P, LLVMInRegAttribute);
                                            ^
ac_nir_to_llvm.c:710:63: error: use of undeclared identifier
'LLVMReadNoneAttribute'
        return emit_llvm_intrinsic(ctx, intrin, ctx->f32, params, 1,
LLVMReadNoneAt...
                                                                     ^
ac_nir_to_llvm.c:721:63: error: use of undeclared identifier
'LLVMReadNoneAttribute'
        return emit_llvm_intrinsic(ctx, intrin, ctx->f32, params, 2,
LLVMReadNoneAt...
                                                                     ^
ac_nir_to_llvm.c:733:63: error: use of undeclared identifier
'LLVMReadNoneAttribute'
        return emit_llvm_intrinsic(ctx, intrin, ctx->f32, params, 3,
LLVMReadNoneAt...
                                                                     ^
ac_nir_to_llvm.c:759:72: error: use of undeclared identifier
'LLVMReadNoneAttribute'
        return emit_llvm_intrinsic(ctx, "llvm.cttz.i32", ctx->i32, params, 2,
LLVMReadNoneA...
                                                                              ^
ac_nir_to_llvm.c:767:13: error: use of undeclared identifier
'LLVMReadNoneAttribute'
                                               LLVMReadNoneAttribute);
                                               ^
ac_nir_to_llvm.c:793:13: error: use of undeclared identifier
'LLVMReadNoneAttribute'
                                               LLVMReadNoneAttribute);
                                               ^
ac_nir_to_llvm.c:857:8: error: use of undeclared identifier
'LLVMReadNoneAttribute'
                                                 LLVMReadNoneAttribute);
                                                 ^
ac_nir_to_llvm.c:873:18: error: use of undeclared identifier
'LLVMReadNoneAttribute'
                                  params, 2, LLVMReadNoneAttribute);
                                             ^
ac_nir_to_llvm.c:918:63: error: use of undeclared identifier
'LLVMReadNoneAttribute'
        result = emit_llvm_intrinsic(ctx, intrin, ctx->i32, srcs, 3,
LLVMReadNoneAt...
                                                                     ^
ac_nir_to_llvm.c:1025:21: error: use of undeclared identifier
'LLVMReadNoneAttribute'
                                          tid_args, 2, LLVMReadNoneAttribute);
                                                       ^
ac_nir_to_llvm.c:1029:20: error: use of undeclared identifier
'LLVMReadNoneAttribute'
                                  tid_args, 2, LLVMReadNoneAttribute);
                                               ^
ac_nir_to_llvm.c:1117:7: error: use of undeclared identifier
'LLVMReadNoneAttribute'
                                         LLVMReadNoneAttribute);
                                         ^
ac_nir_to_llvm.c:1123:9: error: use of undeclared identifier
'LLVMReadNoneAttribute'
                                           LLVMReadNoneAttribute);
                                           ^
ac_nir_to_llvm.c:1453:78: error: use of undeclared identifier
'LLVMReadNoneAttribute'
  ...result = emit_llvm_intrinsic(ctx, "llvm.bitreverse.i32", ctx->i32, src, 1,
LLVMRead...
                                                                               
^
ac_nir_to_llvm.c:1456:73: error: use of undeclared identifier
'LLVMReadNoneAttribute'
  ...result = emit_llvm_intrinsic(ctx, "llvm.ctpop.i32", ctx->i32, src, 1,
LLVMReadNoneA...
                                                                           ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20161109/965c3ff5/attachment.html>


More information about the mesa-dev mailing list