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-30 03:57:50.000000000 +0000 +++ intel-graphics-compiler-igc-1.0.7423/IGC/Compiler/Optimizer/OpenCLPasses/AddressSpaceAliasAnalysis/AddressSpaceAliasAnalysis.cpp 2021-05-30 03:58:49.407617885 +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-30 03:57:50.000000000 +0000 +++ intel-graphics-compiler-igc-1.0.7423/IGC/VectorCompiler/igcdeps/src/ShaderOverride.cpp 2021-05-30 03:58:49.410951420 +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-30 03:57:50.000000000 +0000 +++ intel-graphics-compiler-igc-1.0.7423/IGC/VectorCompiler/lib/GenXCodeGen/GenXCFSimplification.cpp 2021-05-30 04:15:43.651839453 +0000 @@ -301,8 +301,8 @@ BasicBlock *GenXCFSimplification::proces while (Restart) { Restart = false; for (auto ui = I->use_begin(), ue = I->use_end(); ui != ue; ++ui) - if (recursivelySimplifyInstruction( - cast(ui->getUser()))) { + if (replaceAndRecursivelySimplify( + cast(ui->getUser()), nullptr)) { Restart = true; break; } 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-30 03:57:50.000000000 +0000 +++ intel-graphics-compiler-igc-1.0.7423/IGC/VectorCompiler/lib/GenXCodeGen/GenXSubtarget.cpp 2021-05-30 03:58:49.410951420 +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-30 03:57:50.000000000 +0000 +++ intel-graphics-compiler-igc-1.0.7423/IGC/VectorCompiler/lib/GenXCodeGen/GenXSubtarget.h 2021-05-30 03:58:49.410951420 +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-30 03:57:50.000000000 +0000 +++ intel-graphics-compiler-igc-1.0.7423/IGC/VectorCompiler/lib/GenXOpts/CMPacketize/gen_builder.hpp 2021-05-30 04:12:27.043415543 +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); @@ -186,11 +176,6 @@ CallInst* GC_STATEPOINT_CALL(uint64_t ID 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 CallArgs, ArrayRef TransitionArgs, ArrayRef DeoptArgs, ArrayRef 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 CallArgs, ArrayRef DeoptArgs, ArrayRef GCArgs, const Twine &Name = "") { return IRB()->CreateGCStatepointCall(ID, NumPatchBytes, ActualCallee, CallArgs, DeoptArgs, GCArgs, Name); @@ -201,11 +186,6 @@ InvokeInst* GC_STATEPOINT_INVOKE(uint64_ 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 InvokeArgs, ArrayRef TransitionArgs, ArrayRef DeoptArgs, ArrayRef 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 InvokeArgs, ArrayRef DeoptArgs, ArrayRef GCArgs, const Twine &Name = "") { return IRB()->CreateGCStatepointInvoke(ID, NumPatchBytes, ActualInvokee, NormalDest, UnwindDest, InvokeArgs, DeoptArgs, GCArgs, Name);