[arch-commits] Commit in intel-graphics-compiler/trunk (2 files)

Evangelos Foutras foutrelis at archlinux.org
Sat May 29 20:35:10 UTC 2021


    Date: Saturday, May 29, 2021 @ 20:35:10
  Author: foutrelis
Revision: 950241

upgpkg: intel-graphics-compiler 1:1.0.7423-1: bump + LLVM 12 rebuild

Added:
  intel-graphics-compiler/trunk/more-build-fixes-for-LLVM-12.patch
Modified:
  intel-graphics-compiler/trunk/PKGBUILD

------------------------------------+
 PKGBUILD                           |   24 ++++-
 more-build-fixes-for-LLVM-12.patch |  143 +++++++++++++++++++++++++++++++++++
 2 files changed, 162 insertions(+), 5 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-05-29 20:13:53 UTC (rev 950240)
+++ PKGBUILD	2021-05-29 20:35:10 UTC (rev 950241)
@@ -3,7 +3,7 @@
 
 pkgname=intel-graphics-compiler
 epoch=1
-pkgver=1.0.5435
+pkgver=1.0.7423
 pkgrel=1
 pkgdesc="Intel Graphics Compiler for OpenCL"
 arch=(x86_64)
@@ -13,17 +13,31 @@
 makedepends=(git cmake clang llvm python)
 options=(!emptydirs)
 source=(${url}/archive/igc-${pkgver}.tar.gz
-        git+https://github.com/intel/vc-intrinsics.git#commit=eabcd2022cf868a658b257b8ea6ad62acbbe7dc5)
-sha256sums=('9dec70f57a7a65e8f8e041f72d4c50fe3f4bb3bef205e5173a3e1d8031176d55'
-            'SKIP')
+        git+https://github.com/intel/vc-intrinsics.git#commit=2d0795c6799d262a464e5e8b8f74b09dd3ec1054
+        ${pkgname}-fix-build-with-LLVM-12.patch::https://github.com/intel/intel-graphics-compiler/commit/1c28c742daac.patch
+        more-build-fixes-for-LLVM-12.patch)
+sha256sums=('4213710fcb5a299a1fc4c7429375312f7875b9efab2323e6e180ba908ba4cb00'
+            'SKIP'
+            'c464562f2bc6a5434ab33a5799062c0459fa81b2d7e79df015d003266dc850d0'
+            '0ab3dfa84c2f67aad99f086c3d0b2abba0be86a4a80a75883cf4e89282b166ce')
 
+prepare() {
+    cd ${pkgname}-igc-${pkgver}
+    # two patches to build with LLVM 12 -- the first one was committed but
+    # later reverted upstream -- the second one is untested but it builds!
+    # https://github.com/intel/intel-graphics-compiler/pull/171
+    patch -Np1 -i ../${pkgname}-fix-build-with-LLVM-12.patch
+    patch -Np1 -i ../more-build-fixes-for-LLVM-12.patch
+}
+
 build() {
+    CXXFLAGS+=' -Wno-error=deprecated-declarations'
     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_PREFERRED_LLVM_VERSION='11.0.0' \
+        -DIGC_OPTION__LLVM_PREFERRED_VERSION='12.0.0' \
         -DVC_INTRINSICS_SRC="${srcdir}/vc-intrinsics" \
         -DINSTALL_SPIRVDLL=0 \
         -DINSTALL_GENX_IR=ON \

Added: more-build-fixes-for-LLVM-12.patch
===================================================================
--- more-build-fixes-for-LLVM-12.patch	                        (rev 0)
+++ more-build-fixes-for-LLVM-12.patch	2021-05-29 20:35:10 UTC (rev 950241)
@@ -0,0 +1,143 @@
+diff -upr intel-graphics-compiler-igc-1.0.7423.orig/IGC/Compiler/Optimizer/OpenCLPasses/AddressSpaceAliasAnalysis/AddressSpaceAliasAnalysis.cpp intel-graphics-compiler-igc-1.0.7423/IGC/Compiler/Optimizer/OpenCLPasses/AddressSpaceAliasAnalysis/AddressSpaceAliasAnalysis.cpp
+--- intel-graphics-compiler-igc-1.0.7423.orig/IGC/Compiler/Optimizer/OpenCLPasses/AddressSpaceAliasAnalysis/AddressSpaceAliasAnalysis.cpp	2021-05-29 19:24:45.000000000 +0000
++++ intel-graphics-compiler-igc-1.0.7423/IGC/Compiler/Optimizer/OpenCLPasses/AddressSpaceAliasAnalysis/AddressSpaceAliasAnalysis.cpp	2021-05-29 19:46:18.959672182 +0000
+@@ -7,6 +7,9 @@ SPDX-License-Identifier: MIT
+ ============================= end_copyright_notice ===========================*/
+ 
+ #include "llvm/Config/llvm-config.h"
++#if LLVM_VERSION_MAJOR >= 12
++#include "llvm/Analysis/TargetLibraryInfo.h"
++#endif
+ #include "Compiler/Optimizer/OpenCLPasses/AddressSpaceAliasAnalysis/AddressSpaceAliasAnalysis.h"
+ #include "Compiler/CodeGenPublic.h"
+ #include "Compiler/IGCPassSupport.h"
+diff -upr intel-graphics-compiler-igc-1.0.7423.orig/IGC/VectorCompiler/igcdeps/src/ShaderOverride.cpp intel-graphics-compiler-igc-1.0.7423/IGC/VectorCompiler/igcdeps/src/ShaderOverride.cpp
+--- intel-graphics-compiler-igc-1.0.7423.orig/IGC/VectorCompiler/igcdeps/src/ShaderOverride.cpp	2021-05-29 19:24:45.000000000 +0000
++++ intel-graphics-compiler-igc-1.0.7423/IGC/VectorCompiler/igcdeps/src/ShaderOverride.cpp	2021-05-29 19:47:25.133584902 +0000
+@@ -78,7 +78,7 @@ static std::string legalizeName(std::str
+ bool VC_IGCShaderOverrider::override(void *&GenXBin, int &GenXBinSize,
+                                      llvm::StringRef ShaderName,
+                                      Extensions Ext) const {
+-  std::string const LegalizedShaderName = legalizeName(ShaderName);
++  std::string const LegalizedShaderName = legalizeName(ShaderName.str());
+   std::string const FullPath = path(LegalizedShaderName, Ext);
+   bool Status = false;
+ 
+diff -upr intel-graphics-compiler-igc-1.0.7423.orig/IGC/VectorCompiler/lib/GenXCodeGen/GenXCFSimplification.cpp intel-graphics-compiler-igc-1.0.7423/IGC/VectorCompiler/lib/GenXCodeGen/GenXCFSimplification.cpp
+--- intel-graphics-compiler-igc-1.0.7423.orig/IGC/VectorCompiler/lib/GenXCodeGen/GenXCFSimplification.cpp	2021-05-29 19:24:45.000000000 +0000
++++ intel-graphics-compiler-igc-1.0.7423/IGC/VectorCompiler/lib/GenXCodeGen/GenXCFSimplification.cpp	2021-05-29 19:41:52.560572042 +0000
+@@ -287,6 +287,7 @@ BasicBlock *GenXCFSimplification::proces
+       Value *V = Phi->getIncomingValueForBlock(BB);
+       Phi->replaceAllUsesWith(V);
+       Phi->eraseFromParent();
++#if LLVM_VERSION_MAJOR < 12
+       // Having got rid of the phi, it is worth running instruction
+       // simplification on each use. Specifically, this turns the
+       // P3 = (P1 & P2) | (P1 & ~P2) at the endif of an if that
+@@ -308,6 +309,7 @@ BasicBlock *GenXCFSimplification::proces
+             }
+         }
+       }
++#endif
+     } else {
+       unsigned PredIdx = Phi->getBasicBlockIndex(Pred);
+       unsigned BBIdx = Phi->getBasicBlockIndex(BB);
+diff -upr intel-graphics-compiler-igc-1.0.7423.orig/IGC/VectorCompiler/lib/GenXCodeGen/GenXSubtarget.cpp intel-graphics-compiler-igc-1.0.7423/IGC/VectorCompiler/lib/GenXCodeGen/GenXSubtarget.cpp
+--- intel-graphics-compiler-igc-1.0.7423.orig/IGC/VectorCompiler/lib/GenXCodeGen/GenXSubtarget.cpp	2021-05-29 19:24:45.000000000 +0000
++++ intel-graphics-compiler-igc-1.0.7423/IGC/VectorCompiler/lib/GenXCodeGen/GenXSubtarget.cpp	2021-05-29 19:45:43.667584219 +0000
+@@ -94,12 +94,20 @@ void GenXSubtarget::resetSubtargetFeatur
+   if (CPUName.empty())
+     CPUName = "generic";
+ 
+-  ParseSubtargetFeatures(CPUName, FS);
++  ParseSubtargetFeatures(CPUName,
++#if LLVM_VERSION_MAJOR >= 12
++                         /*TuneCPU*/ CPUName,
++#endif
++                         FS);
+ }
+ 
+ GenXSubtarget::GenXSubtarget(const Triple &TT, const std::string &CPU,
+                              const std::string &FS)
+-    : GenXGenSubtargetInfo(TT, CPU, FS), TargetTriple(TT) {
++    : GenXGenSubtargetInfo(TT, CPU,
++#if LLVM_VERSION_MAJOR >= 12
++                           /*TuneCPU*/ CPU,
++#endif
++                           FS), TargetTriple(TT) {
+ 
+   resetSubtargetFeatures(CPU, FS);
+ }
+diff -upr intel-graphics-compiler-igc-1.0.7423.orig/IGC/VectorCompiler/lib/GenXCodeGen/GenXSubtarget.h intel-graphics-compiler-igc-1.0.7423/IGC/VectorCompiler/lib/GenXCodeGen/GenXSubtarget.h
+--- intel-graphics-compiler-igc-1.0.7423.orig/IGC/VectorCompiler/lib/GenXCodeGen/GenXSubtarget.h	2021-05-29 19:24:45.000000000 +0000
++++ intel-graphics-compiler-igc-1.0.7423/IGC/VectorCompiler/lib/GenXCodeGen/GenXSubtarget.h	2021-05-29 19:44:41.143882881 +0000
+@@ -139,7 +139,11 @@ public:
+ 
+   // ParseSubtargetFeatures - Parses features string setting specified
+   // subtarget options.  Definition of function is auto generated by tblgen.
+-  void ParseSubtargetFeatures(StringRef CPU, StringRef FS);
++  void ParseSubtargetFeatures(StringRef CPU,
++#if LLVM_VERSION_MAJOR >= 12
++                              StringRef TuneCPU,
++#endif
++                              StringRef FS);
+ 
+   // \brief Reset the features for the GenX target.
+   void resetSubtargetFeatures(StringRef CPU, StringRef FS);
+diff -upr intel-graphics-compiler-igc-1.0.7423.orig/IGC/VectorCompiler/lib/GenXOpts/CMPacketize/gen_builder.hpp intel-graphics-compiler-igc-1.0.7423/IGC/VectorCompiler/lib/GenXOpts/CMPacketize/gen_builder.hpp
+--- intel-graphics-compiler-igc-1.0.7423.orig/IGC/VectorCompiler/lib/GenXOpts/CMPacketize/gen_builder.hpp	2021-05-29 19:24:45.000000000 +0000
++++ intel-graphics-compiler-igc-1.0.7423/IGC/VectorCompiler/lib/GenXOpts/CMPacketize/gen_builder.hpp	2021-05-29 19:29:33.047199164 +0000
+@@ -136,16 +136,6 @@ CallInst* INT_MIN_REDUCE(Value *Src, boo
+     return IRB()->CreateIntMinReduce(Src, IsSigned);
+ }
+ 
+-CallInst* FP_MAX_REDUCE(Value *Src, bool NoNaN = false)
+-{
+-    return IRB()->CreateFPMaxReduce(Src, NoNaN);
+-}
+-
+-CallInst* FP_MIN_REDUCE(Value *Src, bool NoNaN = false)
+-{
+-    return IRB()->CreateFPMinReduce(Src, NoNaN);
+-}
+-
+ CallInst* LIFETIME_START(Value *Ptr, ConstantInt *Size = nullptr)
+ {
+     return IRB()->CreateLifetimeStart(Ptr, Size);
+@@ -181,36 +171,6 @@ CallInst* ASSUMPTION(Value *Cond)
+     return IRB()->CreateAssumption(Cond);
+ }
+ 
+-CallInst* GC_STATEPOINT_CALL(uint64_t ID, uint32_t NumPatchBytes, Value *ActualCallee, ArrayRef<Value *> CallArgs, ArrayRef<Value *> DeoptArgs, ArrayRef<Value *> GCArgs, const Twine &Name = "")
+-{
+-    return IRB()->CreateGCStatepointCall(ID, NumPatchBytes, ActualCallee, CallArgs, DeoptArgs, GCArgs, Name);
+-}
+-
+-CallInst* GC_STATEPOINT_CALL(uint64_t ID, uint32_t NumPatchBytes, Value *ActualCallee, uint32_t Flags, ArrayRef<Use> CallArgs, ArrayRef<Use> TransitionArgs, ArrayRef<Use> DeoptArgs, ArrayRef<Value *> GCArgs, const Twine &Name = "")
+-{
+-    return IRB()->CreateGCStatepointCall(ID, NumPatchBytes, ActualCallee, Flags, CallArgs, TransitionArgs, DeoptArgs, GCArgs, Name);
+-}
+-
+-CallInst* GC_STATEPOINT_CALL(uint64_t ID, uint32_t NumPatchBytes, Value *ActualCallee, ArrayRef<Use> CallArgs, ArrayRef<Value *> DeoptArgs, ArrayRef<Value *> GCArgs, const Twine &Name = "")
+-{
+-    return IRB()->CreateGCStatepointCall(ID, NumPatchBytes, ActualCallee, CallArgs, DeoptArgs, GCArgs, Name);
+-}
+-
+-InvokeInst* GC_STATEPOINT_INVOKE(uint64_t ID, uint32_t NumPatchBytes, Value *ActualInvokee, BasicBlock *NormalDest, BasicBlock *UnwindDest, ArrayRef<Value *> InvokeArgs, ArrayRef<Value *> DeoptArgs, ArrayRef<Value *> GCArgs, const Twine &Name = "")
+-{
+-    return IRB()->CreateGCStatepointInvoke(ID, NumPatchBytes, ActualInvokee, NormalDest, UnwindDest, InvokeArgs, DeoptArgs, GCArgs, Name);
+-}
+-
+-InvokeInst* GC_STATEPOINT_INVOKE(uint64_t ID, uint32_t NumPatchBytes, Value *ActualInvokee, BasicBlock *NormalDest, BasicBlock *UnwindDest, uint32_t Flags, ArrayRef<Use> InvokeArgs, ArrayRef<Use> TransitionArgs, ArrayRef<Use> DeoptArgs, ArrayRef<Value *> GCArgs, const Twine &Name = "")
+-{
+-    return IRB()->CreateGCStatepointInvoke(ID, NumPatchBytes, ActualInvokee, NormalDest, UnwindDest, Flags, InvokeArgs, TransitionArgs, DeoptArgs, GCArgs, Name);
+-}
+-
+-InvokeInst* GC_STATEPOINT_INVOKE(uint64_t ID, uint32_t NumPatchBytes, Value *ActualInvokee, BasicBlock *NormalDest, BasicBlock *UnwindDest, ArrayRef<Use> InvokeArgs, ArrayRef<Value *> DeoptArgs, ArrayRef<Value *> GCArgs, const Twine &Name = "")
+-{
+-    return IRB()->CreateGCStatepointInvoke(ID, NumPatchBytes, ActualInvokee, NormalDest, UnwindDest, InvokeArgs, DeoptArgs, GCArgs, Name);
+-}
+-
+ CallInst* GC_RESULT(Instruction *Statepoint, Type *ResultType, const Twine &Name = "")
+ {
+     return IRB()->CreateGCResult(Statepoint, ResultType, Name);



More information about the arch-commits mailing list