Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[xsrc-draft/trunk]: xsrc/external/mit/MesaLib/dist/src Support LLVM 12



details:   https://anonhg.NetBSD.org/xsrc-all/rev/697dab788073
branches:  trunk
changeset: 10649:697dab788073
user:      Joerg Sonnenberger <joerg%bec.de@localhost>
date:      Tue Feb 16 23:25:08 2021 +0100

description:
Support LLVM 12

diffstat:

 external/mit/MesaLib/dist/src/amd/common/ac_llvm_helper.cpp                  |  7 +++++++
 external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm/lp_bld_format_srgb.c |  2 +-
 external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm/lp_bld_init.c        |  2 ++
 external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp      |  2 +-
 4 files changed, 11 insertions(+), 2 deletions(-)

diffs (64 lines):

diff -r 8f371a63be95 -r 697dab788073 external/mit/MesaLib/dist/src/amd/common/ac_llvm_helper.cpp
--- a/external/mit/MesaLib/dist/src/amd/common/ac_llvm_helper.cpp       Thu Feb 11 12:24:39 2021 +0000
+++ b/external/mit/MesaLib/dist/src/amd/common/ac_llvm_helper.cpp       Tue Feb 16 23:25:08 2021 +0100
@@ -34,6 +34,7 @@
 #include "ac_llvm_build.h"
 
 #include <llvm-c/Core.h>
+#include <llvm/ADT/SmallString.h>
 #include <llvm/Target/TargetMachine.h>
 #include <llvm/IR/IRBuilder.h>
 #include <llvm/Analysis/TargetLibraryInfo.h>
@@ -129,9 +130,15 @@
 
        llvm::TargetMachine *TM = reinterpret_cast<llvm::TargetMachine*>(tm);
 
+#if HAVE_LLVM < 0x900
        if (TM->addPassesToEmitFile(p->passmgr, p->ostream,
                                    nullptr,
                                    llvm::TargetMachine::CGFT_ObjectFile)) {
+#else
+       if (TM->addPassesToEmitFile(p->passmgr, p->ostream,
+                                   nullptr,
+                                   llvm::CGFT_ObjectFile)) {
+#endif
                fprintf(stderr, "amd: TargetMachine can't emit a file of this type!\n");
                delete p;
                return NULL;
diff -r 8f371a63be95 -r 697dab788073 external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm/lp_bld_format_srgb.c
--- a/external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm/lp_bld_format_srgb.c      Thu Feb 11 12:24:39 2021 +0000
+++ b/external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm/lp_bld_format_srgb.c      Tue Feb 16 23:25:08 2021 +0100
@@ -66,7 +66,7 @@
  * @author Roland Scheidegger <sroland%vmware.com@localhost>
  */
 
-
+#include <math.h>
 #include "util/u_debug.h"
 
 #include "lp_bld_type.h"
diff -r 8f371a63be95 -r 697dab788073 external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm/lp_bld_init.c
--- a/external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm/lp_bld_init.c     Thu Feb 11 12:24:39 2021 +0000
+++ b/external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm/lp_bld_init.c     Tue Feb 16 23:25:08 2021 +0100
@@ -167,7 +167,9 @@
        */
       LLVMAddReassociatePass(gallivm->passmgr);
       LLVMAddPromoteMemoryToRegisterPass(gallivm->passmgr);
+#if HAVE_LLVM < 0xd00
       LLVMAddConstantPropagationPass(gallivm->passmgr);
+#endif
       LLVMAddInstructionCombiningPass(gallivm->passmgr);
       LLVMAddGVNPass(gallivm->passmgr);
    }
diff -r 8f371a63be95 -r 697dab788073 external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
--- a/external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp   Thu Feb 11 12:24:39 2021 +0000
+++ b/external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp   Tue Feb 16 23:25:08 2021 +0100
@@ -72,7 +72,7 @@
 
 #include <llvm/Support/TargetSelect.h>
 
-#if HAVE_LLVM >= 0x0305
+#if HAVE_LLVM >= 0x0305 && HAVE_LLVM < 0xa00
 #include <llvm/IR/CallSite.h>
 #endif
 #include <llvm/IR/IRBuilder.h>



Home | Main Index | Thread Index | Old Index