FreeBSD Bugzilla – Attachment 181667 Details for
Bug 218551
graphics/dri: backport LLVM 5.0 support from Mesa 17.1
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
v0
Mesa.LLVM50.diff (text/plain), 4.41 KB, created by
Jan Beich
on 2017-04-10 19:52:16 UTC
(
hide
)
Description:
v0
Filename:
MIME Type:
Creator:
Jan Beich
Created:
2017-04-10 19:52:16 UTC
Size:
4.41 KB
patch
obsolete
>Index: graphics/dri/Makefile >=================================================================== >--- graphics/dri/Makefile (revision 438202) >+++ graphics/dri/Makefile (working copy) >@@ -3,6 +3,7 @@ > > PORTNAME= dri > PORTVERSION= ${MESAVERSION} >+PORTREVISION= 1 > PORTEPOCH= 2 > CATEGORIES= graphics > >Index: graphics/libGL/files/patch-llvm50 >=================================================================== >--- graphics/libGL/files/patch-llvm50 (nonexistent) >+++ graphics/libGL/files/patch-llvm50 (working copy) >@@ -0,0 +1,94 @@ >+https://cgit.freedesktop.org/mesa/mesa/commit/?id=84012262ea70 >+https://cgit.freedesktop.org/mesa/mesa/commit/?id=6e2b9fd07171 >+https://cgit.freedesktop.org/mesa/mesa/commit/?id=d9f8bae616dd >+ >+--- src/amd/common/ac_llvm_helper.cpp.orig 2017-04-01 15:33:36 UTC >++++ src/amd/common/ac_llvm_helper.cpp >+@@ -37,18 +37,24 @@ >+ #include <llvm/ExecutionEngine/ExecutionEngine.h> >+ #include <llvm/IR/Attributes.h> >+ >++#if HAVE_LLVM < 0x0500 >++namespace llvm { >++typedef AttributeSet AttributeList; >++} >++#endif >++ >+ void ac_add_attr_dereferenceable(LLVMValueRef val, uint64_t bytes) >+ { >+ llvm::Argument *A = llvm::unwrap<llvm::Argument>(val); >+ llvm::AttrBuilder B; >+ B.addDereferenceableAttr(bytes); >+- A->addAttr(llvm::AttributeSet::get(A->getContext(), A->getArgNo() + 1, B)); >++ A->addAttr(llvm::AttributeList::get(A->getContext(), A->getArgNo() + 1, B)); >+ } >+ >+ bool ac_is_sgpr_param(LLVMValueRef arg) >+ { >+ llvm::Argument *A = llvm::unwrap<llvm::Argument>(arg); >+- llvm::AttributeSet AS = A->getParent()->getAttributes(); >++ llvm::AttributeList AS = A->getParent()->getAttributes(); >+ unsigned ArgNo = A->getArgNo(); >+ return AS.hasAttribute(ArgNo + 1, llvm::Attribute::ByVal) || >+ AS.hasAttribute(ArgNo + 1, llvm::Attribute::InReg); >+--- src/gallium/auxiliary/gallivm/lp_bld_misc.cpp.orig 2017-04-01 15:33:37 UTC >++++ src/gallium/auxiliary/gallivm/lp_bld_misc.cpp >+@@ -755,17 +755,6 @@ lp_free_memory_manager(LLVMMCJITMemoryMa >+ delete reinterpret_cast<BaseMemoryManager*>(memorymgr); >+ } >+ >+-extern "C" void >+-lp_add_attr_dereferenceable(LLVMValueRef val, uint64_t bytes) >+-{ >+-#if HAVE_LLVM >= 0x0306 >+- llvm::Argument *A = llvm::unwrap<llvm::Argument>(val); >+- llvm::AttrBuilder B; >+- B.addDereferenceableAttr(bytes); >+- A->addAttr(llvm::AttributeSet::get(A->getContext(), A->getArgNo() + 1, B)); >+-#endif >+-} >+- >+ extern "C" LLVMValueRef >+ lp_get_called_value(LLVMValueRef call) >+ { >+--- src/gallium/auxiliary/gallivm/lp_bld_misc.h.orig 2017-04-01 15:33:37 UTC >++++ src/gallium/auxiliary/gallivm/lp_bld_misc.h >+@@ -73,9 +73,6 @@ lp_get_default_memory_manager(); >+ extern void >+ lp_free_memory_manager(LLVMMCJITMemoryManagerRef memorymgr); >+ >+-extern void >+-lp_add_attr_dereferenceable(LLVMValueRef val, uint64_t bytes); >+- >+ extern LLVMValueRef >+ lp_get_called_value(LLVMValueRef call); >+ >+--- src/gallium/drivers/radeonsi/si_shader.c.orig 2017-04-01 15:33:37 UTC >++++ src/gallium/drivers/radeonsi/si_shader.c >+@@ -5502,7 +5502,7 @@ static void si_create_function(struct si >+ */ >+ if (LLVMGetTypeKind(LLVMTypeOf(P)) == LLVMPointerTypeKind) { >+ lp_add_function_attr(ctx->main_fn, i + 1, LP_FUNC_ATTR_BYVAL); >+- lp_add_attr_dereferenceable(P, UINT64_MAX); >++ ac_add_attr_dereferenceable(P, UINT64_MAX); >+ } else >+ lp_add_function_attr(ctx->main_fn, i + 1, LP_FUNC_ATTR_INREG); >+ } >+--- src/gallium/state_trackers/clover/llvm/compat.hpp.orig 2017-04-01 15:33:37 UTC >++++ src/gallium/state_trackers/clover/llvm/compat.hpp >+@@ -83,7 +83,14 @@ namespace clover { >+ inline void >+ add_link_bitcode_file(clang::CodeGenOptions &opts, >+ const std::string &path) { >+-#if HAVE_LLVM >= 0x0308 >++#if HAVE_LLVM >= 0x0500 >++ clang::CodeGenOptions::BitcodeFileToLink F; >++ >++ F.Filename = path; >++ F.PropagateAttrs = true; >++ F.LinkFlags = ::llvm::Linker::Flags::None; >++ opts.LinkBitcodeFiles.emplace_back(F); >++#elif HAVE_LLVM >= 0x0308 >+ opts.LinkBitcodeFiles.emplace_back(::llvm::Linker::Flags::None, path); >+ #else >+ opts.LinkBitcodeFile = path; > >Property changes on: graphics/libGL/files/patch-llvm50 >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 218551
: 181667