Date: Thursday, July 21, 2022 @ 11:46:38 Author: archange Revision: 1255019
archrelease: copy trunk to community-x86_64 Added: intel-graphics-compiler/repos/community-x86_64/PKGBUILD (from rev 1255018, intel-graphics-compiler/trunk/PKGBUILD) intel-graphics-compiler/repos/community-x86_64/fix-AlignmentAnalysis-test-failures-on-LLVM-14.patch (from rev 1255018, intel-graphics-compiler/trunk/fix-AlignmentAnalysis-test-failures-on-LLVM-14.patch) intel-graphics-compiler/repos/community-x86_64/fix-zlib-linking.patch (from rev 1255018, intel-graphics-compiler/trunk/fix-zlib-linking.patch) Deleted: intel-graphics-compiler/repos/community-x86_64/PKGBUILD intel-graphics-compiler/repos/community-x86_64/fix-AlignmentAnalysis-test-failures-on-LLVM-14.patch intel-graphics-compiler/repos/community-x86_64/fix-zlib-linking.patch ------------------------------------------------------+ PKGBUILD | 149 ++++++++--------- fix-AlignmentAnalysis-test-failures-on-LLVM-14.patch | 116 ++++++------- fix-zlib-linking.patch | 28 +-- 3 files changed, 147 insertions(+), 146 deletions(-) Deleted: PKGBUILD =================================================================== --- PKGBUILD 2022-07-21 11:46:29 UTC (rev 1255018) +++ PKGBUILD 2022-07-21 11:46:38 UTC (rev 1255019) @@ -1,74 +0,0 @@ -# Maintainer: Daniel Bermond <dberm...@archlinux.org> -# Maintainer: Bruno Pagani <archa...@archlinux.org> - -pkgname=intel-graphics-compiler -epoch=1 -pkgver=1.0.11485 -pkgrel=7 -pkgdesc="Intel Graphics Compiler for OpenCL" -arch=(x86_64) -url="https://github.com/intel/intel-graphics-compiler" -license=(MIT) -depends=(llvm-libs intel-opencl-clang ncurses spirv-tools zlib) -makedepends=(git cmake clang lld llvm python libunwind spirv-headers vc-intrinsics) -options=(!emptydirs) -source=(${url}/archive/igc-${pkgver}.tar.gz - fix-zlib-linking.patch - ${pkgname}-fix-BiF-caching.patch::https://github.com/intel/intel-graphics-compiler/commit/12c99343388eba6e6275856b25e0fa8978585dfb.patch - ${pkgname}-wrap-getNumArgOperands.patch::https://github.com/intel/intel-graphics-compiler/commit/1d5ceafdbc005f3adc58be5af1dc92f068908e16.patch - ${pkgname}-update-raytracing-llvm14.patch::https://github.com/intel/intel-graphics-compiler/commit/d9535cc5c3e54b21d56c492d4e21cb13c80b9b7a.patch - ${pkgname}-fix-getElementType.patch::https://github.com/intel/intel-graphics-compiler/commit/49f4d4e3e904179bf3a0b880732b92f8bfb2c64a.patch - ${pkgname}-avoid-duplicate-entries.patch::https://github.com/intel/intel-graphics-compiler/commit/12332c1ee8e92238c919ad7c2aa36119259cb622.patch - ${pkgname}-rework-kernel-metadata.patch::https://github.com/intel/intel-graphics-compiler/commit/6a13fa903f380e17378286a7cd43995b0ae162ad.patch - fix-AlignmentAnalysis-test-failures-on-LLVM-14.patch - ${pkgname}-namespace-IIT.patch::https://github.com/intel/intel-graphics-compiler/commit/8b49f42e8148284815b4c31bf1c280e7ae2b03be.patch) -sha256sums=('a2bcb5a96c64691b21ab6b573a2b09dbe1354272281cf640f4d43ecd7753e25f' - '41ad4d72b4f5e00161d736c8f51c9a2421548d226511cd133143408fccc4bfd0' - '474d5ad34fa4c7c447190470346f8a944f105a11b1c95c2cded1fc28934fea48' - 'a98519cdc6fd896aa59cdae10da41e12d45a73d073646104c76c09ac6c9b5c76' - '16b77d68da5f832c67650135f673bf33ff70dd84ce9cf6fae502588b566ec6c9' - '43d94e5408142d401e35394add9ecdf2a283740a4cca7691fd3689626482006b' - '0c5fe7d98bf6b0f8e288b91fe139cfe7f0dcb89b55e6c471af9b0a026a94781a' - '60b96639a7247f7bf86f451135881afd387f692e1a84c9a8695dc5a39ec3a3f2' - '6652f7249f1c2b0aa3fa31837df8f494bad8badb8373988c91a15e08807c80a5' - '5f760fc20fcbd3184b3a7d893c7daa6f3d88568e368cc1129ce47eb48685463a') - -prepare() { - patch -p1 -d ${pkgname}-igc-${pkgver} < fix-zlib-linking.patch - patch -p1 -d ${pkgname}-igc-${pkgver} < ${pkgname}-fix-BiF-caching.patch - patch -p1 -d ${pkgname}-igc-${pkgver} < ${pkgname}-wrap-getNumArgOperands.patch - patch -p1 -d ${pkgname}-igc-${pkgver} < ${pkgname}-update-raytracing-llvm14.patch - patch -p1 -d ${pkgname}-igc-${pkgver} < ${pkgname}-fix-getElementType.patch - patch -p1 -d ${pkgname}-igc-${pkgver} < ${pkgname}-avoid-duplicate-entries.patch - patch -p1 -d ${pkgname}-igc-${pkgver} < ${pkgname}-rework-kernel-metadata.patch - patch -p1 -d ${pkgname}-igc-${pkgver} < fix-AlignmentAnalysis-test-failures-on-LLVM-14.patch - patch -p1 -d ${pkgname}-igc-${pkgver} < ${pkgname}-namespace-IIT.patch -} - -build() { - export CFLAGS="$CFLAGS -Wno-error=odr" - export CXXFLAGS="$CXXFLAGS -Wno-error=odr" - cmake -B build -S ${pkgname}-igc-${pkgver} \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DIGC_OPTION__ARCHITECTURE_TARGET='Linux64' \ - -DIGC_OPTION__CLANG_MODE=Prebuilds \ - -DIGC_OPTION__LLD_MODE=Prebuilds \ - -DIGC_OPTION__LLVM_PREFERRED_VERSION='14.0.6' \ - -DIGC_OPTION__LLVM_MODE=Prebuilds \ - -DIGC_OPTION__LINK_KHRONOS_SPIRV_TRANSLATOR=ON \ - -DIGC_OPTION__USE_PREINSTALLED_SPRIV_HEADERS=ON \ - -DIGC_OPTION__SPIRV_TOOLS_MODE=Prebuilds \ - -DIGC_OPTION__SPIRV_TRANSLATOR_MODE=Prebuilds \ - -DIGC_OPTION__VC_INTRINSICS_MODE=Prebuilds \ - -DINSTALL_GENX_IR=ON \ - -Wno-dev - make -C build -} - -package() { - make -C build DESTDIR="${pkgdir}" install - install -D -m644 ${pkgname}-igc-${pkgver}/LICENSE.md -t "${pkgdir}"/usr/share/licenses/${pkgname} - mv "${pkgdir}"/usr/lib/igc/NOTICES.txt "${pkgdir}"/usr/share/licenses/${pkgname} -} Copied: intel-graphics-compiler/repos/community-x86_64/PKGBUILD (from rev 1255018, intel-graphics-compiler/trunk/PKGBUILD) =================================================================== --- PKGBUILD (rev 0) +++ PKGBUILD 2022-07-21 11:46:38 UTC (rev 1255019) @@ -0,0 +1,75 @@ +# Maintainer: Daniel Bermond <dberm...@archlinux.org> +# Maintainer: Bruno Pagani <archa...@archlinux.org> + +pkgname=intel-graphics-compiler +epoch=1 +pkgver=1.0.11485 +pkgrel=8 +pkgdesc="Intel Graphics Compiler for OpenCL" +arch=(x86_64) +url="https://github.com/intel/intel-graphics-compiler" +license=(MIT) +depends=(llvm-libs intel-opencl-clang ncurses spirv-tools zlib) +makedepends=(git cmake clang lld llvm python libunwind spirv-headers vc-intrinsics) +options=(!emptydirs) +source=(${url}/archive/igc-${pkgver}.tar.gz + fix-zlib-linking.patch + ${pkgname}-fix-BiF-caching.patch::https://github.com/intel/intel-graphics-compiler/commit/12c99343388eba6e6275856b25e0fa8978585dfb.patch + ${pkgname}-wrap-getNumArgOperands.patch::https://github.com/intel/intel-graphics-compiler/commit/1d5ceafdbc005f3adc58be5af1dc92f068908e16.patch + ${pkgname}-update-raytracing-llvm14.patch::https://github.com/intel/intel-graphics-compiler/commit/d9535cc5c3e54b21d56c492d4e21cb13c80b9b7a.patch + ${pkgname}-fix-getElementType.patch::https://github.com/intel/intel-graphics-compiler/commit/49f4d4e3e904179bf3a0b880732b92f8bfb2c64a.patch + ${pkgname}-avoid-duplicate-entries.patch::https://github.com/intel/intel-graphics-compiler/commit/12332c1ee8e92238c919ad7c2aa36119259cb622.patch + ${pkgname}-rework-kernel-metadata.patch::https://github.com/intel/intel-graphics-compiler/commit/6a13fa903f380e17378286a7cd43995b0ae162ad.patch + fix-AlignmentAnalysis-test-failures-on-LLVM-14.patch + ${pkgname}-namespace-IIT.patch::https://github.com/intel/intel-graphics-compiler/commit/8b49f42e8148284815b4c31bf1c280e7ae2b03be.patch + ${pkgname}-namespace-vc.patch::https://github.com/intel/intel-graphics-compiler/commit/42e32345a3d88aeaa2d28af237bb5aa4ccccf8b3.patch) +sha256sums=('a2bcb5a96c64691b21ab6b573a2b09dbe1354272281cf640f4d43ecd7753e25f' + '41ad4d72b4f5e00161d736c8f51c9a2421548d226511cd133143408fccc4bfd0' + '474d5ad34fa4c7c447190470346f8a944f105a11b1c95c2cded1fc28934fea48' + 'a98519cdc6fd896aa59cdae10da41e12d45a73d073646104c76c09ac6c9b5c76' + '16b77d68da5f832c67650135f673bf33ff70dd84ce9cf6fae502588b566ec6c9' + '43d94e5408142d401e35394add9ecdf2a283740a4cca7691fd3689626482006b' + '0c5fe7d98bf6b0f8e288b91fe139cfe7f0dcb89b55e6c471af9b0a026a94781a' + '60b96639a7247f7bf86f451135881afd387f692e1a84c9a8695dc5a39ec3a3f2' + '6652f7249f1c2b0aa3fa31837df8f494bad8badb8373988c91a15e08807c80a5' + '5f760fc20fcbd3184b3a7d893c7daa6f3d88568e368cc1129ce47eb48685463a' + 'c02d98852d0472d00a4826c99cfedb9231309100d983ce6684cc2dea8f0b0753') + +prepare() { + patch -p1 -d ${pkgname}-igc-${pkgver} < fix-zlib-linking.patch + patch -p1 -d ${pkgname}-igc-${pkgver} < ${pkgname}-fix-BiF-caching.patch + patch -p1 -d ${pkgname}-igc-${pkgver} < ${pkgname}-wrap-getNumArgOperands.patch + patch -p1 -d ${pkgname}-igc-${pkgver} < ${pkgname}-update-raytracing-llvm14.patch + patch -p1 -d ${pkgname}-igc-${pkgver} < ${pkgname}-fix-getElementType.patch + patch -p1 -d ${pkgname}-igc-${pkgver} < ${pkgname}-avoid-duplicate-entries.patch + patch -p1 -d ${pkgname}-igc-${pkgver} < ${pkgname}-rework-kernel-metadata.patch + patch -p1 -d ${pkgname}-igc-${pkgver} < fix-AlignmentAnalysis-test-failures-on-LLVM-14.patch + patch -p1 -d ${pkgname}-igc-${pkgver} < ${pkgname}-namespace-IIT.patch + patch -p1 -d ${pkgname}-igc-${pkgver} < ${pkgname}-namespace-vc.patch +} + +build() { + cmake -B build -S ${pkgname}-igc-${pkgver} \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DIGC_OPTION__ARCHITECTURE_TARGET='Linux64' \ + -DIGC_OPTION__CLANG_MODE=Prebuilds \ + -DIGC_OPTION__LLD_MODE=Prebuilds \ + -DIGC_OPTION__LLVM_PREFERRED_VERSION='14.0.6' \ + -DIGC_OPTION__LLVM_MODE=Prebuilds \ + -DIGC_OPTION__LINK_KHRONOS_SPIRV_TRANSLATOR=ON \ + -DIGC_OPTION__USE_PREINSTALLED_SPRIV_HEADERS=ON \ + -DIGC_OPTION__SPIRV_TOOLS_MODE=Prebuilds \ + -DIGC_OPTION__SPIRV_TRANSLATOR_MODE=Prebuilds \ + -DIGC_OPTION__VC_INTRINSICS_MODE=Prebuilds \ + -DINSTALL_GENX_IR=ON \ + -Wno-dev + make -C build +} + +package() { + make -C build DESTDIR="${pkgdir}" install + install -D -m644 ${pkgname}-igc-${pkgver}/LICENSE.md -t "${pkgdir}"/usr/share/licenses/${pkgname} + mv "${pkgdir}"/usr/lib/igc/NOTICES.txt "${pkgdir}"/usr/share/licenses/${pkgname} +} Deleted: fix-AlignmentAnalysis-test-failures-on-LLVM-14.patch =================================================================== --- fix-AlignmentAnalysis-test-failures-on-LLVM-14.patch 2022-07-21 11:46:29 UTC (rev 1255018) +++ fix-AlignmentAnalysis-test-failures-on-LLVM-14.patch 2022-07-21 11:46:38 UTC (rev 1255019) @@ -1,58 +0,0 @@ -From b73e51557b018b3aaf55b26db8020315560df55c Mon Sep 17 00:00:00 2001 -From: Artem Gindinson <artem.gindin...@intel.com> -Date: Fri, 24 Jun 2022 08:15:02 +0000 -Subject: [PATCH] Fix AlignmentAnalysis test failures on LLVM 14 - -Whenever `getAlignValue()` returned 64-bit `llvm::Value::MaximumAlignment`, -previous type cast adjustments for LLVM 14 ended up truncating the result to 0, -which in turn sparked incorrect comparison results. Adjust type casting to fix -crashes/incorrect `align` values in the LIT tests. - -(cherry picked from commit 52109330c13213844ee7c7d471a8cc455a3517ee) ---- - .../AlignmentAnalysis/AlignmentAnalysis.cpp | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/IGC/Compiler/Optimizer/OpenCLPasses/AlignmentAnalysis/AlignmentAnalysis.cpp b/IGC/Compiler/Optimizer/OpenCLPasses/AlignmentAnalysis/AlignmentAnalysis.cpp -index 8516e69af..21d07a58a 100644 ---- a/IGC/Compiler/Optimizer/OpenCLPasses/AlignmentAnalysis/AlignmentAnalysis.cpp -+++ b/IGC/Compiler/Optimizer/OpenCLPasses/AlignmentAnalysis/AlignmentAnalysis.cpp -@@ -181,17 +181,17 @@ auto AlignmentAnalysis::getAlignValue(Value* V) const - bool AlignmentAnalysis::processInstruction(llvm::Instruction* I) - { - // Get the currently known alignment of I. -- unsigned int currAlign = getAlignValue(I); -+ alignment_t currAlign = getAlignValue(I); - - // Compute the instruction's alignment - // using the alignment of the arguments. -- unsigned int newAlign = 0; -+ alignment_t newAlign = 0; - if (I->getType()->isPointerTy()) - { - // If a pointer is specifically given an 'align' field in the MD, use it. - MDNode* alignmentMD = I->getMetadata("align"); - if (alignmentMD) -- newAlign = (unsigned)mdconst::dyn_extract<ConstantInt>(alignmentMD->getOperand(0))->getZExtValue(); -+ newAlign = (alignment_t)mdconst::dyn_extract<ConstantInt>(alignmentMD->getOperand(0))->getZExtValue(); - } - if (!newAlign) - { -@@ -208,7 +208,7 @@ bool AlignmentAnalysis::processInstruction(llvm::Instruction* I) - - if (newAlign != currAlign) - { -- m_alignmentMap[I] = newAlign; -+ m_alignmentMap[I] = (unsigned)newAlign; - return true; - } - -@@ -381,7 +381,7 @@ unsigned int AlignmentAnalysis::visitGetElementPtrInst(GetElementPtrInst& I) - { - Ty = GTI.getIndexedType(); - unsigned int multiplier = int_cast<unsigned int>(m_DL->getTypeAllocSize(Ty)); -- offset = multiplier * getAlignValue(*op); -+ offset = multiplier * (unsigned)getAlignValue(*op); - } - - // It's possible offset is not a power of 2, because struct fields Copied: intel-graphics-compiler/repos/community-x86_64/fix-AlignmentAnalysis-test-failures-on-LLVM-14.patch (from rev 1255018, intel-graphics-compiler/trunk/fix-AlignmentAnalysis-test-failures-on-LLVM-14.patch) =================================================================== --- fix-AlignmentAnalysis-test-failures-on-LLVM-14.patch (rev 0) +++ fix-AlignmentAnalysis-test-failures-on-LLVM-14.patch 2022-07-21 11:46:38 UTC (rev 1255019) @@ -0,0 +1,58 @@ +From b73e51557b018b3aaf55b26db8020315560df55c Mon Sep 17 00:00:00 2001 +From: Artem Gindinson <artem.gindin...@intel.com> +Date: Fri, 24 Jun 2022 08:15:02 +0000 +Subject: [PATCH] Fix AlignmentAnalysis test failures on LLVM 14 + +Whenever `getAlignValue()` returned 64-bit `llvm::Value::MaximumAlignment`, +previous type cast adjustments for LLVM 14 ended up truncating the result to 0, +which in turn sparked incorrect comparison results. Adjust type casting to fix +crashes/incorrect `align` values in the LIT tests. + +(cherry picked from commit 52109330c13213844ee7c7d471a8cc455a3517ee) +--- + .../AlignmentAnalysis/AlignmentAnalysis.cpp | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/IGC/Compiler/Optimizer/OpenCLPasses/AlignmentAnalysis/AlignmentAnalysis.cpp b/IGC/Compiler/Optimizer/OpenCLPasses/AlignmentAnalysis/AlignmentAnalysis.cpp +index 8516e69af..21d07a58a 100644 +--- a/IGC/Compiler/Optimizer/OpenCLPasses/AlignmentAnalysis/AlignmentAnalysis.cpp ++++ b/IGC/Compiler/Optimizer/OpenCLPasses/AlignmentAnalysis/AlignmentAnalysis.cpp +@@ -181,17 +181,17 @@ auto AlignmentAnalysis::getAlignValue(Value* V) const + bool AlignmentAnalysis::processInstruction(llvm::Instruction* I) + { + // Get the currently known alignment of I. +- unsigned int currAlign = getAlignValue(I); ++ alignment_t currAlign = getAlignValue(I); + + // Compute the instruction's alignment + // using the alignment of the arguments. +- unsigned int newAlign = 0; ++ alignment_t newAlign = 0; + if (I->getType()->isPointerTy()) + { + // If a pointer is specifically given an 'align' field in the MD, use it. + MDNode* alignmentMD = I->getMetadata("align"); + if (alignmentMD) +- newAlign = (unsigned)mdconst::dyn_extract<ConstantInt>(alignmentMD->getOperand(0))->getZExtValue(); ++ newAlign = (alignment_t)mdconst::dyn_extract<ConstantInt>(alignmentMD->getOperand(0))->getZExtValue(); + } + if (!newAlign) + { +@@ -208,7 +208,7 @@ bool AlignmentAnalysis::processInstruction(llvm::Instruction* I) + + if (newAlign != currAlign) + { +- m_alignmentMap[I] = newAlign; ++ m_alignmentMap[I] = (unsigned)newAlign; + return true; + } + +@@ -381,7 +381,7 @@ unsigned int AlignmentAnalysis::visitGetElementPtrInst(GetElementPtrInst& I) + { + Ty = GTI.getIndexedType(); + unsigned int multiplier = int_cast<unsigned int>(m_DL->getTypeAllocSize(Ty)); +- offset = multiplier * getAlignValue(*op); ++ offset = multiplier * (unsigned)getAlignValue(*op); + } + + // It's possible offset is not a power of 2, because struct fields Deleted: fix-zlib-linking.patch =================================================================== --- fix-zlib-linking.patch 2022-07-21 11:46:29 UTC (rev 1255018) +++ fix-zlib-linking.patch 2022-07-21 11:46:38 UTC (rev 1255019) @@ -1,14 +0,0 @@ ---- a/IGC/cmake/igc_find_liblldELF.cmake -+++ b/IGC/cmake/igc_find_liblldELF.cmake -@@ -136,6 +136,11 @@ elseif(IGC_BUILD__LLVM_PREBUILDS) - ${LLD_ELF_LLVM_DEPS} - lldCommon) - -+ if(LLVM_ENABLE_ZLIB) -+ find_package(ZLIB) -+ target_link_libraries(lldELF INTERFACE ZLIB::ZLIB) -+ endif() -+ - find_path( - LLD_INCLUDE_DIR - NAMES "Driver.h" Copied: intel-graphics-compiler/repos/community-x86_64/fix-zlib-linking.patch (from rev 1255018, intel-graphics-compiler/trunk/fix-zlib-linking.patch) =================================================================== --- fix-zlib-linking.patch (rev 0) +++ fix-zlib-linking.patch 2022-07-21 11:46:38 UTC (rev 1255019) @@ -0,0 +1,14 @@ +--- a/IGC/cmake/igc_find_liblldELF.cmake ++++ b/IGC/cmake/igc_find_liblldELF.cmake +@@ -136,6 +136,11 @@ elseif(IGC_BUILD__LLVM_PREBUILDS) + ${LLD_ELF_LLVM_DEPS} + lldCommon) + ++ if(LLVM_ENABLE_ZLIB) ++ find_package(ZLIB) ++ target_link_libraries(lldELF INTERFACE ZLIB::ZLIB) ++ endif() ++ + find_path( + LLD_INCLUDE_DIR + NAMES "Driver.h"