Date: Thu, 27 Jan 2022 09:29:14 GMT From: Yuri Victorovich <yuri@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: a5ee676da7a3 - main - devel/ispc: Update 1.16.1 -> 1.17.0 Message-ID: <202201270929.20R9TEj8037902@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=a5ee676da7a3910530312f386902bd3d1fce4da0 commit a5ee676da7a3910530312f386902bd3d1fce4da0 Author: Yuri Victorovich <yuri@FreeBSD.org> AuthorDate: 2022-01-27 09:28:01 +0000 Commit: Yuri Victorovich <yuri@FreeBSD.org> CommitDate: 2022-01-27 09:29:09 +0000 devel/ispc: Update 1.16.1 -> 1.17.0 The project has renamed its option GENX to XE. Rename the port option accordingly. Reported by: portscout --- devel/ispc/Makefile | 29 ++++++++++++---------- devel/ispc/distinfo | 6 ++--- devel/ispc/files/patch-CMakeLists.txt | 4 +-- .../ispc/files/patch-cmake_GenerateBuiltins.cmake | 4 +-- devel/ispc/files/patch-src_func.cpp | 17 ------------- devel/ispc/files/patch-src_ispc.cpp | 25 ------------------- devel/ispc/files/patch-src_llvmutil.cpp | 4 +-- devel/ispc/files/patch-src_module.cpp | 27 ++------------------ devel/ispc/files/patch-src_opt.cpp | 29 ++++++---------------- 9 files changed, 34 insertions(+), 111 deletions(-) diff --git a/devel/ispc/Makefile b/devel/ispc/Makefile index 05624cbf9db3..45717a4afdf0 100644 --- a/devel/ispc/Makefile +++ b/devel/ispc/Makefile @@ -2,8 +2,7 @@ PORTNAME= ispc DISTVERSIONPREFIX= v -DISTVERSION= 1.16.1 -PORTREVISION= 3 +DISTVERSION= 1.17.0 CATEGORIES= devel MAINTAINER= yuri@FreeBSD.org @@ -20,7 +19,9 @@ BUILD_DEPENDS= ${LOCALBASE}/bin/flex:textproc/flex \ LIB_DEPENDS= libLLVM.so:devel/llvm${LLVM_VERSION} USES= bison cmake compiler:c++14-lang python:build,test shebangfix +USE_LDCONFIG= yes USE_GITHUB= yes + SHEBANG_FILES= *.py CONFIGURE_ENV= PATH=${LOCALBASE}/llvm${LLVM_VERSION}/bin:${PATH} @@ -31,20 +32,22 @@ BINARY_ALIAS= flex=${LOCALBASE}/bin/flex python=${PYTHON_CMD} m4=${LOCALBASE}/bi PLIST_FILES= bin/ispc \ bin/check_isa -OPTIONS_DEFINE_amd64= GENX -OPTIONS_DEFAULT_amd64= GENX +OPTIONS_DEFINE_amd64= XE +OPTIONS_DEFAULT_amd64= XE -GENX_DESC= Intel GPU 8/16-wide SIMD support -GENX_BUILD_DEPENDS= ${LOCALBASE}/llvm${LLVM_VERSION}/lib/libLLVMGenXIntrinsics.a:devel/vc-intrinsics@llvm${LLVM_VERSION} -GENX_LIB_DEPENDS= libze_loader.so:devel/level-zero \ +XE_DESC= Enable Intel Xe support +XE_BUILD_DEPENDS= ${LOCALBASE}/llvm${LLVM_VERSION}/lib/libLLVMGenXIntrinsics.a:devel/vc-intrinsics@llvm${LLVM_VERSION} +XE_LIB_DEPENDS= libze_loader.so:devel/level-zero \ libLLVMSPIRVLib.so.${LLVM_VERSION}:devel/spirv-llvm-translator@llvm${LLVM_VERSION} -GENX_CMAKE_BOOL= GENX_ENABLED -GENX_CMAKE_BOOL_OFF= ISPCRT_BUILD_TESTS -GENX_CMAKE_ON= -DGENX_DEPS_DIR:PATH="${LOCALBASE}/llvm${LLVM_VERSION}" -GENX_PLIST_FILES= include/ispcrt/ispcrt.h \ +XE_CMAKE_BOOL= XE_ENABLED +XE_CMAKE_BOOL_OFF= ISPCRT_BUILD_TESTS +XE_CMAKE_ON= -DXE_DEPS_DIR:PATH="${LOCALBASE}/llvm${LLVM_VERSION}" -DISPC_INCLUDE_XE_EXAMPLES=OFF +XE_PLIST_FILES= include/ispcrt/ispcrt.h \ include/ispcrt/ispcrt.hpp \ include/ispcrt/ispcrt.isph \ + lib/cmake/ispcrt-${PORTVERSION}/Finddpcpp_compiler.cmake \ lib/cmake/ispcrt-${PORTVERSION}/Findlevel_zero.cmake \ + lib/cmake/ispcrt-${PORTVERSION}/interop.cmake \ lib/cmake/ispcrt-${PORTVERSION}/ispc.cmake \ lib/cmake/ispcrt-${PORTVERSION}/ispcrtConfig.cmake \ lib/cmake/ispcrt-${PORTVERSION}/ispcrt_Exports-%%CMAKE_BUILD_TYPE%%.cmake \ @@ -61,9 +64,9 @@ GENX_PLIST_FILES= include/ispcrt/ispcrt.h \ #LLVM_VERSION= ${LLVM_DEFAULT} #.endif -LLVM_VERSION?= 11 # 13 fails on some systems with: Assertion failed: (PointeeType && "Must specify element type"), function Create +LLVM_VERSION?= 13 -do-test: # some tests fail: https://github.com/ispc/ispc/issues/1868 +do-test: # some tests fail: https://github.com/ispc/ispc/issues/1868, https://github.com/ispc/ispc/issues/2244 @cd ${WRKSRC} && ISPC_HOME=${BUILD_WRKSRC}/bin ./run_tests.py test-check-all: # the upstream claims that some of these checks are broken without using their patched llvm version, hence using llvm-devel diff --git a/devel/ispc/distinfo b/devel/ispc/distinfo index d4928fc12244..a36a0aa08200 100644 --- a/devel/ispc/distinfo +++ b/devel/ispc/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1626566179 -SHA256 (ispc-ispc-v1.16.1_GH0.tar.gz) = e5dcd0d85df6ed5feb454ad9ec295083a07d7459fcaba00d5dd6266ceb476399 -SIZE (ispc-ispc-v1.16.1_GH0.tar.gz) = 19549428 +TIMESTAMP = 1643247706 +SHA256 (ispc-ispc-v1.17.0_GH0.tar.gz) = 37fb1055d6c6b232e112d8d50145d726824ed4d8da93a7396315dceba6c76e62 +SIZE (ispc-ispc-v1.17.0_GH0.tar.gz) = 19436681 diff --git a/devel/ispc/files/patch-CMakeLists.txt b/devel/ispc/files/patch-CMakeLists.txt index a014710ff101..2c540960cbae 100644 --- a/devel/ispc/files/patch-CMakeLists.txt +++ b/devel/ispc/files/patch-CMakeLists.txt @@ -1,4 +1,4 @@ ---- CMakeLists.txt.orig 2020-08-28 19:43:13 UTC +--- CMakeLists.txt.orig 2022-01-15 08:35:15 UTC +++ CMakeLists.txt @@ -45,12 +45,17 @@ set(ISPC_BUILD TRUE) project(${PROJECT_NAME}) @@ -18,5 +18,5 @@ -option(ARM_ENABLED "Enable ARM support" ON) +option(ARM_ENABLED "Enable ARM support" ${ARM_HOST}) option(WASM_ENABLED "Enable experimental Web Assembly support" OFF) - option(GENX_ENABLED "Enable GenX support" OFF) + option(XE_ENABLED "Enable Intel Xe support" OFF) option(ISPC_INCLUDE_EXAMPLES "Generate build targets for the ISPC examples" ON) diff --git a/devel/ispc/files/patch-cmake_GenerateBuiltins.cmake b/devel/ispc/files/patch-cmake_GenerateBuiltins.cmake index e541332c18f1..d256ac87934d 100644 --- a/devel/ispc/files/patch-cmake_GenerateBuiltins.cmake +++ b/devel/ispc/files/patch-cmake_GenerateBuiltins.cmake @@ -1,6 +1,6 @@ ---- cmake/GenerateBuiltins.cmake.orig 2021-07-15 23:04:31 UTC +--- cmake/GenerateBuiltins.cmake.orig 2022-01-15 08:35:15 UTC +++ cmake/GenerateBuiltins.cmake -@@ -289,6 +289,8 @@ function(builtin_genx_to_cpp bit resultFileName) +@@ -312,6 +312,8 @@ function(builtin_xe_to_cpp bit resultFileName) set(os_name "windows") elseif (APPLE) set(SKIP ON) diff --git a/devel/ispc/files/patch-src_func.cpp b/devel/ispc/files/patch-src_func.cpp deleted file mode 100644 index ffbcebe61294..000000000000 --- a/devel/ispc/files/patch-src_func.cpp +++ /dev/null @@ -1,17 +0,0 @@ -Regressed by https://github.com/intel/vc-intrinsics/commit/8ee879314584 - -src/func.cpp:490:44: error: no member named 'Reserved_0' in 'llvm::genx::KernelMDOp' - mdArgs[llvm::genx::KernelMDOp::Reserved_0] = - ~~~~~~~~~~~~~~~~~~~~~~~~^ - ---- src/func.cpp.orig 2021-07-15 23:04:31 UTC -+++ src/func.cpp -@@ -487,7 +487,7 @@ void Function::emitCode(FunctionEmitContext *ctx, llvm - llvm::ValueAsMetadata::get(llvm::ConstantInt::getNullValue(i32Type)); - mdArgs[llvm::genx::KernelMDOp::ArgIOKinds] = llvm::MDNode::get(fContext, argInOutKinds); - mdArgs[llvm::genx::KernelMDOp::ArgTypeDescs] = llvm::MDNode::get(fContext, argTypeDescs); -- mdArgs[llvm::genx::KernelMDOp::Reserved_0] = -+ mdArgs[llvm::genx::KernelMDOp::NBarrierCnt] = - llvm::ValueAsMetadata::get(llvm::ConstantInt::getNullValue(i32Type)); - mdArgs[llvm::genx::KernelMDOp::BarrierCnt] = - llvm::ValueAsMetadata::get(llvm::ConstantInt::getNullValue(i32Type)); diff --git a/devel/ispc/files/patch-src_ispc.cpp b/devel/ispc/files/patch-src_ispc.cpp deleted file mode 100644 index e06e096d9b80..000000000000 --- a/devel/ispc/files/patch-src_ispc.cpp +++ /dev/null @@ -1,25 +0,0 @@ ---- src/ispc.cpp.orig 2021-07-15 23:04:31 UTC -+++ src/ispc.cpp -@@ -1464,10 +1464,22 @@ std::string Target::GetTripleString() const { - triple.setArchName("armv7"); - } else if (m_arch == Arch::aarch64) { - triple.setArchName("aarch64"); -+ } else if (m_arch == Arch::genx32) { -+ triple.setArchName("spir"); -+ } else if (m_arch == Arch::genx64) { -+ triple.setArchName("spir64"); - } else { - Error(SourcePos(), "Unknown arch."); - exit(1); - } -+#ifdef ISPC_GENX_ENABLED -+ if (m_arch == Arch::genx32 || m_arch == Arch::genx64) { -+ //"spir64-unknown-unknown" -+ triple.setVendor(llvm::Triple::VendorType::UnknownVendor); -+ triple.setOS(llvm::Triple::OSType::UnknownOS); -+ return triple.str(); -+ } -+#endif - triple.setVendor(llvm::Triple::VendorType::UnknownVendor); - triple.setOS(llvm::Triple::OSType::FreeBSD); - break; diff --git a/devel/ispc/files/patch-src_llvmutil.cpp b/devel/ispc/files/patch-src_llvmutil.cpp index 53237378ba1e..53e2d9708916 100644 --- a/devel/ispc/files/patch-src_llvmutil.cpp +++ b/devel/ispc/files/patch-src_llvmutil.cpp @@ -1,8 +1,8 @@ ISPC devs insist on using dump() functions which LLVM devs consider a debug functionality, and it isn't available in the LLVM packages. ---- src/llvmutil.cpp.orig 2020-01-25 02:15:35 UTC +--- src/llvmutil.cpp.orig 2022-01-15 08:35:15 UTC +++ src/llvmutil.cpp -@@ -1344,7 +1344,7 @@ static void lDumpValue(llvm::Value *v, std::set<llvm:: +@@ -1458,7 +1458,7 @@ static void lDumpValue(llvm::Value *v, std::set<llvm:: return; fprintf(stderr, " "); diff --git a/devel/ispc/files/patch-src_module.cpp b/devel/ispc/files/patch-src_module.cpp index 06bfac61b41f..4eb8cb73a255 100644 --- a/devel/ispc/files/patch-src_module.cpp +++ b/devel/ispc/files/patch-src_module.cpp @@ -1,6 +1,6 @@ ---- src/module.cpp.orig 2021-07-15 23:04:31 UTC +--- src/module.cpp.orig 2022-01-15 08:35:15 UTC +++ src/module.cpp -@@ -102,7 +102,7 @@ +@@ -105,7 +105,7 @@ #define OCLOC_LIBRARY_NAME "ocloc64.dll" #elif defined(_WIN32) #define OCLOC_LIBRARY_NAME "ocloc32.dll" @@ -9,26 +9,3 @@ #define OCLOC_LIBRARY_NAME "libocloc.so" #else #error "Unexpected platform" -@@ -1149,7 +1149,7 @@ bool Module::translateToSPIRV(llvm::Module *module, st - llvm::cl::desc("Allow DWARF operations not listed in the OpenCL.DebugInfo.100 " - "specification (experimental, may produce incompatible SPIR-V " - "module)")); --#if ISPC_LLVM_VERSION < ISPC_LLVM_12_0 -+#if ISPC_LLVM_VERSION >= ISPC_LLVM_13_0 - Opts.setSPIRVAllowUnknownIntrinsics({"llvm.genx"}); - #else - llvm::cl::opt<bool> SPIRVAllowUnknownIntrinsics( -@@ -1314,7 +1314,12 @@ bool Module::writeObjectFileOrAssembly(llvm::TargetMachine *targetMachine, llvm::Module *module, OutputType outputType, - llvm::CodeGenFileType fileType = (outputType == Object) ? llvm::CGFT_ObjectFile : llvm::CGFT_AssemblyFile; - bool binary = (fileType == llvm::CGFT_ObjectFile); - -- llvm::sys::fs::OpenFlags flags = binary ? llvm::sys::fs::F_None : llvm::sys::fs::F_Text; -+ llvm::sys::fs::OpenFlags flags = binary ? -+#if ISPC_LLVM_VERSION >= ISPC_LLVM_13_0 -+ llvm::sys::fs::OF_None : llvm::sys::fs::OF_Text; -+#else -+ llvm::sys::fs::F_None : llvm::sys::fs::F_Text; -+#endif - - std::error_code error; - diff --git a/devel/ispc/files/patch-src_opt.cpp b/devel/ispc/files/patch-src_opt.cpp index 3bf08c14a7d0..d396f5dbd312 100644 --- a/devel/ispc/files/patch-src_opt.cpp +++ b/devel/ispc/files/patch-src_opt.cpp @@ -1,8 +1,8 @@ ISPC devs insist on using dump() functions which LLVM devs consider a debug functionality, and it isn't available in the LLVM packages. ---- src/opt.cpp.orig 2020-01-25 02:15:35 UTC +--- src/opt.cpp.orig 2022-01-15 08:35:15 UTC +++ src/opt.cpp -@@ -144,7 +144,7 @@ static llvm::Pass *CreateFixBooleanSelectPass(); +@@ -155,7 +155,7 @@ static llvm::Pass *CreateMangleOpenCLBuiltins(); getenv("FUNC"), strlen(getenv("FUNC")))))) { \ fprintf(stderr, "Start of " NAME "\n"); \ fprintf(stderr, "---------------\n"); \ @@ -11,7 +11,7 @@ ISPC devs insist on using dump() functions which LLVM devs consider a debug func fprintf(stderr, "---------------\n\n"); \ } else /* eat semicolon */ -@@ -154,7 +154,7 @@ static llvm::Pass *CreateFixBooleanSelectPass(); +@@ -165,7 +165,7 @@ static llvm::Pass *CreateMangleOpenCLBuiltins(); getenv("FUNC"), strlen(getenv("FUNC")))))) { \ fprintf(stderr, "End of " NAME " %s\n", modifiedAny ? "** CHANGES **" : ""); \ fprintf(stderr, "---------------\n"); \ @@ -20,7 +20,7 @@ ISPC devs insist on using dump() functions which LLVM devs consider a debug func fprintf(stderr, "---------------\n\n"); \ } else /* eat semicolon */ #else -@@ -442,7 +442,7 @@ void Optimize(llvm::Module *module, int optLevel) { +@@ -467,7 +467,7 @@ void ispc::Optimize(llvm::Module *module, int optLevel #ifndef ISPC_NO_DUMPS if (g->debugPrint) { printf("*** Code going into optimization ***\n"); @@ -29,7 +29,7 @@ ISPC devs insist on using dump() functions which LLVM devs consider a debug func } #endif DebugPassManager optPM; -@@ -655,7 +655,7 @@ void Optimize(llvm::Module *module, int optLevel) { +@@ -811,7 +811,7 @@ void ispc::Optimize(llvm::Module *module, int optLevel #ifndef ISPC_NO_DUMPS if (g->debugPrint) { printf("\n*****\nFINAL OUTPUT\n*****\n"); @@ -38,7 +38,7 @@ ISPC devs insist on using dump() functions which LLVM devs consider a debug func } #endif } -@@ -1728,11 +1728,11 @@ lExtractUniformsFromOffset(llvm::Value **basePtr, llvm +@@ -1933,11 +1933,11 @@ lExtractUniformsFromOffset(llvm::Value **basePtr, llvm llvm::Value *offsetScale, llvm::Instruction *insertBefore) { #if 1 @@ -53,7 +53,7 @@ ISPC devs insist on using dump() functions which LLVM devs consider a debug func printf("-----\n"); #endif -@@ -4217,7 +4217,7 @@ char DebugPass::ID = 0; +@@ -4746,7 +4746,7 @@ char DebugPass::ID = 0; bool DebugPass::runOnModule(llvm::Module &module) { fprintf(stderr, "%s", str_output); fflush(stderr); @@ -62,18 +62,3 @@ ISPC devs insist on using dump() functions which LLVM devs consider a debug func return true; } -@@ -4687,7 +4687,13 @@ void DebugPassFile::run(llvm::Module &module, bool init) - std::error_code EC; - char fname[100]; - snprintf(fname, sizeof(fname), "%s_%d_%s.ll", init ? "init" : "ir", pnum, sanitize(std::string(pname)).c_str()); -- llvm::raw_fd_ostream OS(fname, EC, llvm::sys::fs::F_None); -+ llvm::raw_fd_ostream OS(fname, EC, -+#if ISPC_LLVM_VERSION >= ISPC_LLVM_13_0 -+ llvm::sys::fs::OF_None -+#else -+ llvm::sys::fs::F_None -+#endif -+ ); - Assert(!EC && "IR dump file creation failed!"); - module.print(OS, 0); - }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202201270929.20R9TEj8037902>