From owner-svn-ports-head@freebsd.org Fri Sep 20 19:58:12 2019 Return-Path: Delivered-To: svn-ports-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8330E125B43; Fri, 20 Sep 2019 19:58:12 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46ZkzS2CWcz4Yvg; Fri, 20 Sep 2019 19:58:12 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2F11C2BB6; Fri, 20 Sep 2019 19:58:12 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8KJwChs055660; Fri, 20 Sep 2019 19:58:12 GMT (envelope-from jbeich@FreeBSD.org) Received: (from jbeich@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8KJwCc2055659; Fri, 20 Sep 2019 19:58:12 GMT (envelope-from jbeich@FreeBSD.org) Message-Id: <201909201958.x8KJwCc2055659@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jbeich set sender to jbeich@FreeBSD.org using -f From: Jan Beich Date: Fri, 20 Sep 2019 19:58:12 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r512439 - head/lang/beignet/files X-SVN-Group: ports-head X-SVN-Commit-Author: jbeich X-SVN-Commit-Paths: head/lang/beignet/files X-SVN-Commit-Revision: 512439 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Sep 2019 19:58:12 -0000 Author: jbeich Date: Fri Sep 20 19:58:11 2019 New Revision: 512439 URL: https://svnweb.freebsd.org/changeset/ports/512439 Log: lang/beignet: unbreak with llvm90 backend/src/llvm/llvm_sampler_fix.cpp:85:18: error: no viable conversion from 'llvm::FunctionCallee' to 'llvm::Value *' Value* samplerCvt = M->getOrInsertFunction("__gen_ocl_sampler_to_int", i32Ty, I->getOperand(0)->getType()); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ backend/src/llvm/llvm_sampler_fix.cpp:127:18: error: no viable conversion from 'llvm::FunctionCallee' to 'llvm::Value *' Value* samplerCvt = M->getOrInsertFunction("__gen_ocl_sampler_to_int", i32Ty, I->getOperand(0)->getType()); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PR: 239175 Approved by: portmgr blanket Added: head/lang/beignet/files/patch-llvm9 (contents, props changed) Added: head/lang/beignet/files/patch-llvm9 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/beignet/files/patch-llvm9 Fri Sep 20 19:58:11 2019 (r512439) @@ -0,0 +1,194 @@ +Regressed by https://github.com/llvm/llvm-project/commit/2e97d2aa1bd3 + +ld: error: backend/src/libgbe.so: undefined reference to clang::ast_matchers::MatchFinder::addMatcher(clang::ast_matchers::internal::Matcher const&, clang::ast_matchers::MatchFinder::MatchCallback*) +ld: error: backend/src/libgbe.so: undefined reference to clang::ast_matchers::MatchFinder::MatchCallback::~MatchCallback() +ld: error: backend/src/libgbe.so: undefined reference to clang::ast_matchers::MatchFinder::match(clang::ast_type_traits::DynTypedNode const&, clang::ASTContext&) +ld: error: backend/src/libgbe.so: undefined reference to clang::ast_matchers::MatchFinder::MatchFinder(clang::ast_matchers::MatchFinder::MatchFinderOptions) +ld: error: backend/src/libgbe.so: undefined reference to clang::ast_matchers::MatchFinder::~MatchFinder() +ld: error: backend/src/libgbe.so: undefined reference to clang::ast_matchers::cxxMethodDecl +ld: error: backend/src/libgbe.so: undefined reference to clang::ast_matchers::cxxRecordDecl +ld: error: backend/src/libgbe.so: undefined reference to clang::ast_matchers::unaryOperator +ld: error: backend/src/libgbe.so: undefined reference to clang::ast_matchers::cxxConstructExpr +ld: error: backend/src/libgbe.so: undefined reference to clang::ast_matchers::cxxConstructorDecl +ld: error: backend/src/libgbe.so: undefined reference to clang::ast_matchers::cxxOperatorCallExpr +ld: error: backend/src/libgbe.so: undefined reference to clang::ast_matchers::expr +ld: error: backend/src/libgbe.so: undefined reference to clang::ast_matchers::allOf +ld: error: backend/src/libgbe.so: undefined reference to clang::ast_matchers::anyOf +ld: error: backend/src/libgbe.so: undefined reference to clang::ast_matchers::eachOf +ld: error: backend/src/libgbe.so: undefined reference to clang::ast_matchers::unless +ld: error: backend/src/libgbe.so: undefined reference to clang::ast_matchers::varDecl +ld: error: backend/src/libgbe.so: undefined reference to clang::ast_matchers::callExpr +ld: error: backend/src/libgbe.so: undefined reference to clang::ast_matchers::castExpr +ld: error: backend/src/libgbe.so: undefined reference to clang::ast_matchers::internal::hasAnyNameFunc(llvm::ArrayRef) +ld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors) +c++: error: linker command failed with exit code 1 (use -v to see invocation) + +Regressed by https://github.com/llvm/llvm-project/commit/13680223b9d8 + +backend/src/llvm/llvm_intrinsic_lowering.cpp:80:19: error: + no viable conversion from 'llvm::FunctionCallee' to 'llvm::Constant *' + Constant* FCache = M->getOrInsertFunction(NewFn, + ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +backend/src/llvm/llvm_sampler_fix.cpp:85:18: error: + no viable conversion from 'llvm::FunctionCallee' to 'llvm::Value *' + ...Value* samplerCvt = M->getOrInsertFunction("__gen_ocl_sampler_to_int", i32Ty, I->getOperand(0)->getType()); + ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +backend/src/llvm/llvm_sampler_fix.cpp:127:18: error: + no viable conversion from 'llvm::FunctionCallee' to 'llvm::Value *' + ...Value* samplerCvt = M->getOrInsertFunction("__gen_ocl_sampler_to_int", i32Ty, I->getOperand(0)->getType()); + ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +backend/src/llvm/llvm_profiling.cpp:166:27: error: no + matching function for call to 'cast' + builder->CreateCall(cast(module->getOrInsertFunction( + ^~~~~~~~~~~~~~~~~~~~ +backend/src/llvm/llvm_device_enqueue.cpp:401:52: error: + no matching function for call to 'cast' + CallInst* newCI = builder.CreateCall(cast(mod->getOrInsertFunction( + ^~~~~~~~~~~~~~~~~~~~ +/usr/local/llvm90/include/llvm/Support/Casting.h:256:44: note: candidate function [with X = llvm::Function, Y + = llvm::FunctionCallee] not viable: expects an l-value for 1st argument +inline typename cast_retty::ret_type cast(Y &Val) { + ^ +/usr/local/llvm90/include/llvm/Support/Casting.h:249:1: note: candidate template ignored: requirement + '!is_simple_type::value' was not satisfied [with X = llvm::Function, Y = + llvm::FunctionCallee] +cast(const Y &Val) { +^ +/usr/local/llvm90/include/llvm/Support/Casting.h:263:46: note: candidate template ignored: could not match + 'Y *' against 'llvm::FunctionCallee' +inline typename cast_retty::ret_type cast(Y *Val) { + ^ +/usr/local/llvm90/include/llvm/Support/Casting.h:271:1: note: candidate template ignored: could not match + 'unique_ptr >' against 'llvm::FunctionCallee' +cast(std::unique_ptr &&Val) { +^ +backend/src/llvm/llvm_profiling.cpp:188:25: error: no + matching function for call to 'cast' + builder->CreateCall(cast(module->getOrInsertFunction( + ^~~~~~~~~~~~~~~~~~~~ +/usr/local/llvm90/include/llvm/Support/Casting.h:256:44: note: candidate function [with X = llvm::Function, Y + = llvm::FunctionCallee] not viable: expects an l-value for 1st argument +inline typename cast_retty::ret_type cast(Y &Val) { + ^ +/usr/local/llvm90/include/llvm/Support/Casting.h:249:1: note: candidate template ignored: requirement + '!is_simple_type::value' was not satisfied [with X = llvm::Function, Y = + llvm::FunctionCallee] +cast(const Y &Val) { +^ +/usr/local/llvm90/include/llvm/Support/Casting.h:263:46: note: candidate template ignored: could not match + 'Y *' against 'llvm::FunctionCallee' +inline typename cast_retty::ret_type cast(Y *Val) { + ^ +/usr/local/llvm90/include/llvm/Support/Casting.h:271:1: note: candidate template ignored: could not match + 'unique_ptr >' against 'llvm::FunctionCallee' +cast(std::unique_ptr &&Val) { +^ + +--- CMake/FindLLVM.cmake.orig 2017-09-22 08:05:22 UTC ++++ CMake/FindLLVM.cmake +@@ -116,6 +116,9 @@ macro(add_one_lib name) + endmacro() + + #Assume clang lib path same as llvm lib path ++if (LLVM_VERSION_NODOT VERSION_GREATER 80) ++add_one_lib("clang-cpp") ++endif (LLVM_VERSION_NODOT VERSION_GREATER 80) + add_one_lib("clangCodeGen") + add_one_lib("clangFrontend") + add_one_lib("clangSerialization") +--- backend/src/llvm/llvm_intrinsic_lowering.cpp.orig 2017-10-24 06:04:48 UTC ++++ backend/src/llvm/llvm_intrinsic_lowering.cpp +@@ -77,7 +77,11 @@ namespace gbe { + std::vector ParamTys; + for (Value** I = ArgBegin; I != ArgEnd; ++I) + ParamTys.push_back((*I)->getType()); ++#if LLVM_VERSION_MAJOR * 10 + LLVM_VERSION_MINOR >= 90 ++ FunctionCallee FCache = M->getOrInsertFunction(NewFn, ++#else + Constant* FCache = M->getOrInsertFunction(NewFn, ++#endif + FunctionType::get(RetTy, ParamTys, false)); + + IRBuilder<> Builder(CI->getParent(), BasicBlock::iterator(CI)); +--- backend/src/llvm/llvm_sampler_fix.cpp.orig 2017-10-24 06:04:48 UTC ++++ backend/src/llvm/llvm_sampler_fix.cpp +@@ -82,7 +82,11 @@ namespace gbe { + #if LLVM_VERSION_MAJOR * 10 + LLVM_VERSION_MINOR >= 40 + Module *M = I->getParent()->getParent()->getParent(); + #if LLVM_VERSION_MAJOR * 10 + LLVM_VERSION_MINOR >= 50 ++#if LLVM_VERSION_MAJOR * 10 + LLVM_VERSION_MINOR >= 90 ++ FunctionCallee samplerCvt = M->getOrInsertFunction("__gen_ocl_sampler_to_int", i32Ty, I->getOperand(0)->getType()); ++#else + Value* samplerCvt = M->getOrInsertFunction("__gen_ocl_sampler_to_int", i32Ty, I->getOperand(0)->getType()); ++#endif + #else + Value* samplerCvt = M->getOrInsertFunction("__gen_ocl_sampler_to_int", i32Ty, I->getOperand(0)->getType(), nullptr); + #endif +@@ -124,7 +128,11 @@ namespace gbe { + #if LLVM_VERSION_MAJOR * 10 + LLVM_VERSION_MINOR >= 40 + Module *M = I->getParent()->getParent()->getParent(); + #if LLVM_VERSION_MAJOR * 10 + LLVM_VERSION_MINOR >= 50 ++#if LLVM_VERSION_MAJOR * 10 + LLVM_VERSION_MINOR >= 90 ++ FunctionCallee samplerCvt = M->getOrInsertFunction("__gen_ocl_sampler_to_int", i32Ty, I->getOperand(0)->getType()); ++#else + Value* samplerCvt = M->getOrInsertFunction("__gen_ocl_sampler_to_int", i32Ty, I->getOperand(0)->getType()); ++#endif + #else + Value* samplerCvt = M->getOrInsertFunction("__gen_ocl_sampler_to_int", i32Ty, I->getOperand(0)->getType(), nullptr); + #endif +--- backend/src/llvm/llvm_profiling.cpp.orig 2017-10-24 06:04:48 UTC ++++ backend/src/llvm/llvm_profiling.cpp +@@ -163,10 +163,18 @@ namespace gbe + // __gen_ocl_store_timestamp(int nth, int type); + Value *Args[2] = {ConstantInt::get(intTy, pointNum++), ConstantInt::get(intTy, profilingType)}; + #if LLVM_VERSION_MAJOR * 10 + LLVM_VERSION_MINOR >= 50 ++#if LLVM_VERSION_MAJOR * 10 + LLVM_VERSION_MINOR >= 90 ++ builder->CreateCall(module->getOrInsertFunction( ++#else + builder->CreateCall(cast(module->getOrInsertFunction( ++#endif + "__gen_ocl_calc_timestamp", Type::getVoidTy(module->getContext()), + IntegerType::getInt32Ty(module->getContext()), ++#if LLVM_VERSION_MAJOR * 10 + LLVM_VERSION_MINOR >= 90 ++ IntegerType::getInt32Ty(module->getContext())), ++#else + IntegerType::getInt32Ty(module->getContext()))), ++#endif + ArrayRef(Args)); + #else + builder->CreateCall(cast(module->getOrInsertFunction( +@@ -185,10 +193,18 @@ namespace gbe + Value *Args2[2] = {profilingBuf, ConstantInt::get(intTy, profilingType)}; + + #if LLVM_VERSION_MAJOR * 10 + LLVM_VERSION_MINOR >= 50 ++#if LLVM_VERSION_MAJOR * 10 + LLVM_VERSION_MINOR >= 90 ++ builder->CreateCall(module->getOrInsertFunction( ++#else + builder->CreateCall(cast(module->getOrInsertFunction( ++#endif + "__gen_ocl_store_profiling", Type::getVoidTy(module->getContext()), + ptrTy, ++#if LLVM_VERSION_MAJOR * 10 + LLVM_VERSION_MINOR >= 90 ++ IntegerType::getInt32Ty(module->getContext())), ++#else + IntegerType::getInt32Ty(module->getContext()))), ++#endif + ArrayRef(Args2)); + #else + builder->CreateCall(cast(module->getOrInsertFunction( +--- backend/src/llvm/llvm_device_enqueue.cpp.orig 2017-10-24 06:04:48 UTC ++++ backend/src/llvm/llvm_device_enqueue.cpp +@@ -398,8 +398,13 @@ namespace gbe { + std::vector ParamTys; + for (Value** iter = args.begin(); iter != args.end(); ++iter) + ParamTys.push_back((*iter)->getType()); ++#if LLVM_VERSION_MAJOR * 10 + LLVM_VERSION_MINOR >= 90 ++ CallInst* newCI = builder.CreateCall(mod->getOrInsertFunction( ++ "__gen_enqueue_kernel_slm", FunctionType::get(intTy, ParamTys, false)), args); ++#else + CallInst* newCI = builder.CreateCall(cast(mod->getOrInsertFunction( + "__gen_enqueue_kernel_slm", FunctionType::get(intTy, ParamTys, false))), args); ++#endif + CI->replaceAllUsesWith(newCI); + deadInsnSet.insert(CI); + }