summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZoltán Böszörményi <zboszor@gmail.com>2021-08-27 10:08:43 +0200
committerAnuj Mittal <anuj.mittal@intel.com>2021-08-27 23:28:04 +0800
commitddb3127f2496a60ac0ca330784c4734b72c9bcbf (patch)
tree67dec22055b40a25a30e43ec5be6eb65409e90e6
parent23d702e38f4e9759651a5121188f7853e97989aa (diff)
downloadmeta-intel-ddb3127f2496a60ac0ca330784c4734b72c9bcbf.tar.gz
intel-graphics-compiler: LLVM 13 fixes
Also add CXXFLAGS=-Wno-error=deprecated-declarations, to turn some deprecated LLVM API usage from warnings to errors. Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com> Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-LLVM-13-fixes.patch437
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.8365.bb3
2 files changed, 440 insertions, 0 deletions
diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-LLVM-13-fixes.patch b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-LLVM-13-fixes.patch
new file mode 100644
index 00000000..b102af0f
--- /dev/null
+++ b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-LLVM-13-fixes.patch
@@ -0,0 +1,437 @@
1From 6247039d9193adf3813375fefc95071e8f5b4097 Mon Sep 17 00:00:00 2001
2From: Buildbot <buildbot@xenial.com>
3Date: Fri, 27 Aug 2021 07:07:04 +0000
4Subject: [PATCH] LLVM 13 fixes
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
10Upstream-Status: Submitted
11---
12 .../LegalizeFunctionSignatures.cpp | 4 ++++
13 IGC/AdaptorOCL/OCL/sp/spp_g8.cpp | 6 ++++-
14 IGC/AdaptorOCL/SPIRV/SPIRVReader.cpp | 8 +++++++
15 IGC/AdaptorOCL/SPIRV/SPIRVUtil.cpp | 8 +++++++
16 IGC/Compiler/GenTTI.cpp | 4 ++++
17 IGC/Compiler/GenTTI.h | 4 ++++
18 IGC/Compiler/Optimizer/BuiltInFuncImport.cpp | 4 ++++
19 IGC/Compiler/Optimizer/CodeAssumption.cpp | 5 ++++
20 .../AddressSpaceAliasAnalysis.cpp | 23 +++++++++++++++++++
21 .../PrivateMemory/PrivateMemoryResolution.cpp | 3 +++
22 IGC/DebugInfo/DwarfDebug.cpp | 8 +++++++
23 IGC/DebugInfo/StreamEmitter.cpp | 14 ++++++++++-
24 IGC/ElfPackager/main.cpp | 4 ++++
25 .../BuiltinsFrontendDefinitions.hpp | 2 +-
26 .../lib/GenXCodeGen/GenXTargetMachine.h | 4 ++++
27 .../include/llvmWrapper/Transforms/Scalar.h | 2 +-
28 IGC/common/LLVMUtils.cpp | 12 ++++++++++
29 visa/iga/IGALibrary/IR/BitSet.hpp | 2 ++
30 18 files changed, 113 insertions(+), 4 deletions(-)
31
32diff --git a/IGC/AdaptorCommon/LegalizeFunctionSignatures.cpp b/IGC/AdaptorCommon/LegalizeFunctionSignatures.cpp
33index ee43be301..395f26c91 100644
34--- a/IGC/AdaptorCommon/LegalizeFunctionSignatures.cpp
35+++ b/IGC/AdaptorCommon/LegalizeFunctionSignatures.cpp
36@@ -377,7 +377,11 @@ void LegalizeFunctionSignatures::FixFunctionBody(Module& M)
37 }
38
39 // Clone the old function body into the new
40+#if LLVM_VERSION_MAJOR >= 13
41+ CloneFunctionInto(pNewFunc, pFunc, VMap, CloneFunctionChangeType::DifferentModule, Returns);
42+#else
43 CloneFunctionInto(pNewFunc, pFunc, VMap, true, Returns);
44+#endif
45
46 // Merge the BB for when extra instructions were created
47 BasicBlock* ClonedEntryBB = cast<BasicBlock>(VMap[&*pFunc->begin()]);
48diff --git a/IGC/AdaptorOCL/OCL/sp/spp_g8.cpp b/IGC/AdaptorOCL/OCL/sp/spp_g8.cpp
49index 6f7c711bc..8d8c4e50d 100644
50--- a/IGC/AdaptorOCL/OCL/sp/spp_g8.cpp
51+++ b/IGC/AdaptorOCL/OCL/sp/spp_g8.cpp
52@@ -387,7 +387,11 @@ bool createElfFileName(std::string &name, unsigned int maxNameLen, SIMDMode simd
53 unsigned int mode = sys::fs::perms::all_read | sys::fs::perms::all_write;
54 // Every '%' will be replaced with a random character (0-9 or a-f), taking care of multithreaded compilations
55 if (std::error_code EC = sys::fs::createUniqueFile(
56- uniqueLockFileName, uniqueLockFileID, resultUniqueLockFileName, mode))
57+ uniqueLockFileName, uniqueLockFileID, resultUniqueLockFileName,
58+#if LLVM_VERSION_MAJOR >= 13
59+ llvm::sys::fs::OF_None,
60+#endif
61+ mode))
62 {
63 IGC_ASSERT_MESSAGE(false, "A uniquely named file not created");
64 retValue = false;
65diff --git a/IGC/AdaptorOCL/SPIRV/SPIRVReader.cpp b/IGC/AdaptorOCL/SPIRV/SPIRVReader.cpp
66index 65e672afe..f28136a6a 100644
67--- a/IGC/AdaptorOCL/SPIRV/SPIRVReader.cpp
68+++ b/IGC/AdaptorOCL/SPIRV/SPIRVReader.cpp
69@@ -97,7 +97,11 @@ isOpenCLKernel(SPIRVFunction *BF) {
70 __attr_unused static void
71 dumpLLVM(Module *M, const std::string &FName) {
72 std::error_code EC;
73+#if LLVM_VERSION_MAJOR >= 13
74+ raw_fd_ostream FS(FName, EC, sys::fs::OF_None);
75+#else
76 raw_fd_ostream FS(FName, EC, sys::fs::F_None);
77+#endif
78 if (!FS.has_error()) {
79 FS << *M;
80 }
81@@ -2413,7 +2417,11 @@ SPIRVToLLVM::postProcessFunctionsReturnStruct(Function *F) {
82 NewArgIt->setName(OldArgIt->getName());
83 VMap[&*OldArgIt] = &*NewArgIt;
84 }
85+#if LLVM_VERSION_MAJOR >= 13
86+ CloneFunctionInto(NewF, F, VMap, CloneFunctionChangeType::DifferentModule, Returns);
87+#else
88 CloneFunctionInto(NewF, F, VMap, true, Returns);
89+#endif
90 auto DL = M->getDataLayout();
91 const auto ptrSize = DL.getPointerSize();
92
93diff --git a/IGC/AdaptorOCL/SPIRV/SPIRVUtil.cpp b/IGC/AdaptorOCL/SPIRV/SPIRVUtil.cpp
94index ecb045b88..0a0893e4a 100644
95--- a/IGC/AdaptorOCL/SPIRV/SPIRVUtil.cpp
96+++ b/IGC/AdaptorOCL/SPIRV/SPIRVUtil.cpp
97@@ -67,7 +67,11 @@ namespace igc_spv{
98 void
99 saveLLVMModule(Module *M, const std::string &OutputFile) {
100 std::error_code EC;
101+#if LLVM_VERSION_MAJOR >= 13
102+ llvm::ToolOutputFile Out(OutputFile.c_str(), EC, sys::fs::OF_None);
103+#else
104 llvm::ToolOutputFile Out(OutputFile.c_str(), EC, sys::fs::F_None);
105+#endif
106 IGC_ASSERT_EXIT_MESSAGE((!EC), "Failed to open file");
107 IGCLLVM::WriteBitcodeToFile(M, Out.os());
108 Out.keep();
109@@ -326,7 +330,11 @@ mutateCallInst(Module *M, CallInst *CI,
110 }
111 }
112
113+#if LLVM_VERSION_MAJOR >= 13
114+ CloneFunctionInto(NewF, OldF, VMap, CloneFunctionChangeType::DifferentModule, Returns);
115+#else
116 CloneFunctionInto(NewF, OldF, VMap, true, Returns);
117+#endif
118
119 // Merge the basic block with Load instruction with the original entry basic block.
120 BasicBlock* ClonedEntryBB = cast<BasicBlock>(VMap[&*OldF->begin()]);
121diff --git a/IGC/Compiler/GenTTI.cpp b/IGC/Compiler/GenTTI.cpp
122index 8a74ec287..23c9bc6ed 100644
123--- a/IGC/Compiler/GenTTI.cpp
124+++ b/IGC/Compiler/GenTTI.cpp
125@@ -461,7 +461,11 @@ namespace llvm {
126 // [LLVM-UPGRADE] moved from getCallCost to getUserCost
127 // https://github.com/llvm/llvm-project/commit/2641a19981e71c887bece92074e00d1af3e716c9#diff-dd4bd65dc55d754674d9a945a0d22911
128
129+#if LLVM_VERSION_MAJOR >= 13
130+ InstructionCost GenIntrinsicsTTIImpl::getUserCost(const User *U, ArrayRef<const Value *> Operands, TTI::TargetCostKind CostKind)
131+#else
132 int GenIntrinsicsTTIImpl::getUserCost(const User *U, ArrayRef<const Value *> Operands, TTI::TargetCostKind CostKind)
133+#endif
134 {
135 const Function* F = dyn_cast<Function>(U);
136 if(F != nullptr)
137diff --git a/IGC/Compiler/GenTTI.h b/IGC/Compiler/GenTTI.h
138index bab1a5c4a..0b3bf4541 100644
139--- a/IGC/Compiler/GenTTI.h
140+++ b/IGC/Compiler/GenTTI.h
141@@ -71,8 +71,12 @@ namespace llvm
142 , const User * U
143 #endif
144 );
145+#else
146+#if LLVM_VERSION_MAJOR >= 13
147+ InstructionCost getUserCost(const User *U, ArrayRef<const Value *> Operands,
148 #else
149 int getUserCost(const User *U, ArrayRef<const Value *> Operands,
150+#endif
151 TTI::TargetCostKind CostKind);
152 #endif
153
154diff --git a/IGC/Compiler/Optimizer/BuiltInFuncImport.cpp b/IGC/Compiler/Optimizer/BuiltInFuncImport.cpp
155index e7995ebb4..035bfba85 100644
156--- a/IGC/Compiler/Optimizer/BuiltInFuncImport.cpp
157+++ b/IGC/Compiler/Optimizer/BuiltInFuncImport.cpp
158@@ -880,7 +880,11 @@ void BIImport::removeFunctionBitcasts(Module& M)
159 pDstFunc,
160 funcTobeChanged,
161 operandMap,
162+#if LLVM_VERSION_MAJOR >= 13
163+ CloneFunctionChangeType::LocalChangesOnly,
164+#else
165 false,
166+#endif
167 Returns,
168 "");
169
170diff --git a/IGC/Compiler/Optimizer/CodeAssumption.cpp b/IGC/Compiler/Optimizer/CodeAssumption.cpp
171index e7208a5fa..3ee9bddca 100644
172--- a/IGC/Compiler/Optimizer/CodeAssumption.cpp
173+++ b/IGC/Compiler/Optimizer/CodeAssumption.cpp
174@@ -272,7 +272,12 @@ bool CodeAssumption::addAssumption(Function* F, AssumptionCache* AC)
175 // Register assumption
176 if (AC)
177 {
178+#if LLVM_VERSION_MAJOR >= 13
179+ if (auto *aI = dyn_cast<AssumeInst>(assumeInst))
180+ AC->registerAssumption(aI);
181+#else
182 AC->registerAssumption(assumeInst);
183+#endif
184 }
185
186 assumptionAdded[PN] = 1;
187diff --git a/IGC/Compiler/Optimizer/OpenCLPasses/AddressSpaceAliasAnalysis/AddressSpaceAliasAnalysis.cpp b/IGC/Compiler/Optimizer/OpenCLPasses/AddressSpaceAliasAnalysis/AddressSpaceAliasAnalysis.cpp
188index a2b5927ea..1516e40e8 100644
189--- a/IGC/Compiler/Optimizer/OpenCLPasses/AddressSpaceAliasAnalysis/AddressSpaceAliasAnalysis.cpp
190+++ b/IGC/Compiler/Optimizer/OpenCLPasses/AddressSpaceAliasAnalysis/AddressSpaceAliasAnalysis.cpp
191@@ -7,6 +7,9 @@ SPDX-License-Identifier: MIT
192 ============================= end_copyright_notice ===========================*/
193
194 #include "llvm/Config/llvm-config.h"
195+#if LLVM_VERSION_MAJOR >= 13
196+#include <llvm/Analysis/AliasAnalysis.h>
197+#endif
198 #include <llvm/Analysis/TargetLibraryInfo.h>
199 #include "Compiler/Optimizer/OpenCLPasses/AddressSpaceAliasAnalysis/AddressSpaceAliasAnalysis.h"
200 #include "Compiler/CodeGenPublic.h"
201@@ -45,7 +48,11 @@ namespace {
202 PointerType* PtrTy2 = dyn_cast<PointerType>(LocB.Ptr->getType());
203
204 if (!PtrTy1 || !PtrTy2)
205+#if LLVM_VERSION_MAJOR >= 13
206+ return AliasResult::Kind::NoAlias;
207+#else
208 return NoAlias;
209+#endif
210
211 unsigned AS1 = PtrTy1->getAddressSpace();
212 unsigned AS2 = PtrTy2->getAddressSpace();
213@@ -62,21 +69,33 @@ namespace {
214 AS1 != ADDRESS_SPACE_GENERIC &&
215 AS2 != ADDRESS_SPACE_GENERIC &&
216 AS1 != AS2)
217+#if LLVM_VERSION_MAJOR >= 13
218+ return AliasResult::Kind::NoAlias;
219+#else
220 return NoAlias;
221+#endif
222
223
224 // Shared local memory doesn't alias any statefull memory.
225 if ((AS1 == ADDRESS_SPACE_LOCAL && AS2 > ADDRESS_SPACE_NUM_ADDRESSES) ||
226 (AS1 > ADDRESS_SPACE_NUM_ADDRESSES && AS2 == ADDRESS_SPACE_LOCAL))
227 {
228+#if LLVM_VERSION_MAJOR >= 13
229+ return AliasResult::Kind::NoAlias;
230+#else
231 return NoAlias;
232+#endif
233 }
234
235 // Private memory doesn't alias any stateful memory
236 if ((AS1 == ADDRESS_SPACE_PRIVATE && AS2 > ADDRESS_SPACE_NUM_ADDRESSES) ||
237 (AS1 > ADDRESS_SPACE_NUM_ADDRESSES && AS2 == ADDRESS_SPACE_PRIVATE))
238 {
239+#if LLVM_VERSION_MAJOR >= 13
240+ return AliasResult::Kind::NoAlias;
241+#else
242 return NoAlias;
243+#endif
244 }
245
246
247@@ -108,7 +127,11 @@ namespace {
248 if ((resourceType[0] != resourceType[1]) || // different resource types
249 (isDirectAccess[0] && isDirectAccess[1] && resourceIndex[0] != resourceIndex[1])) // direct access to different BTIs
250 {
251+#if LLVM_VERSION_MAJOR >= 13
252+ return AliasResult::Kind::NoAlias;
253+#else
254 return NoAlias;
255+#endif
256 }
257 }
258 }
259diff --git a/IGC/Compiler/Optimizer/OpenCLPasses/PrivateMemory/PrivateMemoryResolution.cpp b/IGC/Compiler/Optimizer/OpenCLPasses/PrivateMemory/PrivateMemoryResolution.cpp
260index 48c7e8637..8b9618284 100644
261--- a/IGC/Compiler/Optimizer/OpenCLPasses/PrivateMemory/PrivateMemoryResolution.cpp
262+++ b/IGC/Compiler/Optimizer/OpenCLPasses/PrivateMemory/PrivateMemoryResolution.cpp
263@@ -17,6 +17,9 @@ SPDX-License-Identifier: MIT
264 #include "llvmWrapper/IR/DerivedTypes.h"
265 #include "llvm/Transforms/Utils/Local.h"
266 #include "llvm/IR/DataLayout.h"
267+#if LLVM_VERSION_MAJOR >= 13
268+#include "llvm/IR/DebugInfo.h"
269+#endif
270 #include "llvm/IR/DebugInfoMetadata.h"
271 #include "llvm/IR/Dominators.h"
272 #include "common/LLVMWarningsPop.hpp"
273diff --git a/IGC/DebugInfo/DwarfDebug.cpp b/IGC/DebugInfo/DwarfDebug.cpp
274index f57dd72cb..d984fe86f 100644
275--- a/IGC/DebugInfo/DwarfDebug.cpp
276+++ b/IGC/DebugInfo/DwarfDebug.cpp
277@@ -857,9 +857,17 @@ CompileUnit* DwarfDebug::constructCompileUnit(DICompileUnit* DIUnit)
278 {
279 std::string str;
280 str = "Intel OpenCL ";
281+#if LLVM_VERSION_MAJOR >= 13
282+ str += toString(op1->getValue()->getUniqueInteger(), 10, false);
283+#else
284 str += op1->getValue()->getUniqueInteger().toString(10, false);
285+#endif
286 str += ".";
287+#if LLVM_VERSION_MAJOR >= 13
288+ str += toString(op2->getValue()->getUniqueInteger(), 10, false);
289+#else
290 str += op2->getValue()->getUniqueInteger().toString(10, false);
291+#endif
292
293 NewCU->addString(Die, dwarf::DW_AT_description, llvm::StringRef(str));
294 }
295diff --git a/IGC/DebugInfo/StreamEmitter.cpp b/IGC/DebugInfo/StreamEmitter.cpp
296index a38a445d5..e9a5b6279 100644
297--- a/IGC/DebugInfo/StreamEmitter.cpp
298+++ b/IGC/DebugInfo/StreamEmitter.cpp
299@@ -391,11 +391,23 @@ StreamEmitter::StreamEmitter(raw_pwrite_stream& outStream,
300
301 MCRegisterInfo* regInfo = nullptr;
302
303+ Triple triple = Triple(GetTargetTriple());
304+
305+#if LLVM_VERSION_MAJOR >= 13
306+ // Create new MC context
307+ m_pContext = new MCContext(Triple(GetTargetTriple()),
308+ (const llvm::MCAsmInfo*)m_pAsmInfo, regInfo,
309+ /*MSTI=*/(const llvm::MCSubtargetInfo *)nullptr, m_pSrcMgr);
310+
311+ m_pObjFileInfo->initMCObjectFileInfo(*m_pContext, false);
312+
313+ m_pContext->setObjectFileInfo(m_pObjFileInfo);
314+#else
315 // Create new MC context
316 m_pContext = new MCContext((const llvm::MCAsmInfo*)m_pAsmInfo, regInfo, m_pObjFileInfo, m_pSrcMgr);
317
318- Triple triple = Triple(GetTargetTriple());
319 m_pObjFileInfo->InitMCObjectFileInfo(Triple(GetTargetTriple()), false, *m_pContext);
320+#endif
321
322 bool is64Bit = GetPointerSize() == 8;
323 uint8_t osABI = MCELFObjectTargetWriter::getOSABI(triple.getOS());
324diff --git a/IGC/ElfPackager/main.cpp b/IGC/ElfPackager/main.cpp
325index 38a5001c1..5f4d87d96 100644
326--- a/IGC/ElfPackager/main.cpp
327+++ b/IGC/ElfPackager/main.cpp
328@@ -177,7 +177,11 @@ std::unique_ptr<IGCLLVM::Module> LocalCloneModule(
329 }
330
331 SmallVector<ReturnInst*, 8> Returns; // Ignore returns cloned.
332+#if LLVM_VERSION_MAJOR >= 13
333+ CloneFunctionInto(F, &*I, VMap, CloneFunctionChangeType::DifferentModule, Returns);
334+#else
335 CloneFunctionInto(F, &*I, VMap, /*ModuleLevelChanges=*/true, Returns);
336+#endif
337 }
338
339 if (I->hasPersonalityFn())
340diff --git a/IGC/LLVM3DBuilder/BuiltinsFrontendDefinitions.hpp b/IGC/LLVM3DBuilder/BuiltinsFrontendDefinitions.hpp
341index b5f66f048..568b42c07 100644
342--- a/IGC/LLVM3DBuilder/BuiltinsFrontendDefinitions.hpp
343+++ b/IGC/LLVM3DBuilder/BuiltinsFrontendDefinitions.hpp
344@@ -5028,7 +5028,7 @@ llvm::Value* LLVM3DBuilder<preserveNames, T, Inserter>::ScalarsToVector(
345 IGC_ASSERT(nullptr != resultType);
346 llvm::Value* result = llvm::UndefValue::get(resultType);
347
348- for (unsigned i = 0; i < llvm::cast<llvm::VectorType>(resultType)->getNumElements(); i++)
349+ for (unsigned i = 0; i < llvm::cast<IGCLLVM::FixedVectorType>(resultType)->getNumElements(); i++)
350 {
351 IGC_ASSERT(nullptr != scalars[i]);
352 IGC_ASSERT(llvm::cast<llvm::VectorType>(resultType)->getElementType() == scalars[i]->getType());
353diff --git a/IGC/VectorCompiler/lib/GenXCodeGen/GenXTargetMachine.h b/IGC/VectorCompiler/lib/GenXCodeGen/GenXTargetMachine.h
354index f90bc1bc0..8ce06e93f 100644
355--- a/IGC/VectorCompiler/lib/GenXCodeGen/GenXTargetMachine.h
356+++ b/IGC/VectorCompiler/lib/GenXCodeGen/GenXTargetMachine.h
357@@ -97,7 +97,11 @@ public:
358 bool shouldBuildLookupTables() { return false; }
359 unsigned getFlatAddressSpace() { return 4; }
360
361+#if LLVM_VERSION_MAJOR >= 13
362+ InstructionCost getUserCost(const User *U, ArrayRef<const Value *> Operands
363+#else
364 int getUserCost(const User *U, ArrayRef<const Value *> Operands
365+#endif
366 #if LLVM_VERSION_MAJOR >= 11
367 ,
368 TTI::TargetCostKind CostKind
369diff --git a/IGC/WrapperLLVM/include/llvmWrapper/Transforms/Scalar.h b/IGC/WrapperLLVM/include/llvmWrapper/Transforms/Scalar.h
370index 1df041372..022141d15 100644
371--- a/IGC/WrapperLLVM/include/llvmWrapper/Transforms/Scalar.h
372+++ b/IGC/WrapperLLVM/include/llvmWrapper/Transforms/Scalar.h
373@@ -26,7 +26,7 @@ namespace IGCLLVM
374 {
375 return llvm::createLoopUnrollPass(OptLevel, false, Threshold, Count, AllowPartial, Runtime, UpperBound, AllowPeeling);
376 }
377-#elif LLVM_VERSION_MAJOR >= 9 && LLVM_VERSION_MAJOR <= 12
378+#elif LLVM_VERSION_MAJOR >= 9 && LLVM_VERSION_MAJOR <= 13
379 inline static llvm::Pass * createLoopUnrollPass(
380 int OptLevel = 2, int Threshold = -1, int Count = -1,
381 int AllowPartial = -1, int Runtime = -1,
382diff --git a/IGC/common/LLVMUtils.cpp b/IGC/common/LLVMUtils.cpp
383index ed2cfc413..ae9df5d63 100644
384--- a/IGC/common/LLVMUtils.cpp
385+++ b/IGC/common/LLVMUtils.cpp
386@@ -132,7 +132,11 @@ bool IGCPassManager::isInList(const StringRef& N, const StringRef& List) const
387 size_t endPos = List.find_first_of(Separators, startPos);
388 size_t len = (endPos != StringRef::npos ? endPos - startPos : endPos);
389 StringRef Name = List.substr(startPos, len);
390+#if LLVM_VERSION_MAJOR >= 13
391+ if (Name.equals_insensitive(N))
392+#else
393 if (Name.equals_lower(N))
394+#endif
395 {
396 return true;
397 }
398@@ -149,7 +153,11 @@ bool IGCPassManager::isPrintBefore(Pass* P)
399 // or pass command args registered in passInfo.
400 StringRef passNameList(IGC_GET_REGKEYSTRING(PrintBefore));
401 StringRef PN = P->getPassName();
402+#if LLVM_VERSION_MAJOR >= 13
403+ if (passNameList.equals_insensitive("all") || isInList(PN, passNameList))
404+#else
405 if (passNameList.equals_lower("all") || isInList(PN, passNameList))
406+#endif
407 return true;
408
409 // further check passInfo
410@@ -173,7 +181,11 @@ bool IGCPassManager::isPrintAfter(Pass* P)
411 // or pass command args registered in passInfo.
412 StringRef passNameList(IGC_GET_REGKEYSTRING(PrintAfter));
413 StringRef PN = P->getPassName();
414+#if LLVM_VERSION_MAJOR >= 13
415+ if (passNameList.equals_insensitive("all") || isInList(PN, passNameList))
416+#else
417 if (passNameList.equals_lower("all") || isInList(PN, passNameList))
418+#endif
419 return true;
420
421 // further check passInfo
422diff --git a/visa/iga/IGALibrary/IR/BitSet.hpp b/visa/iga/IGALibrary/IR/BitSet.hpp
423index 43b0d3f92..c6cdd430a 100644
424--- a/visa/iga/IGALibrary/IR/BitSet.hpp
425+++ b/visa/iga/IGALibrary/IR/BitSet.hpp
426@@ -12,6 +12,8 @@ SPDX-License-Identifier: MIT
427 #include "../asserts.hpp"
428 #include "common/secure_mem.h"
429
430+#include <stdexcept>
431+#include <limits>
432 #include <algorithm>
433 #include <bitset>
434 #include <cstdint>
435--
4362.31.1
437
diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.8365.bb b/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.8365.bb
index 153f4bb4..8d557b07 100644
--- a/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.8365.bb
+++ b/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.8365.bb
@@ -14,6 +14,7 @@ SRC_URI = "git://github.com/intel/intel-graphics-compiler.git;protocol=https; \
14 file://0003-Improve-Reproducibility-for-src-package.patch \ 14 file://0003-Improve-Reproducibility-for-src-package.patch \
15 file://0004-find-external-llvm-tblgen.patch \ 15 file://0004-find-external-llvm-tblgen.patch \
16 file://0005-Temporary-LLVM-12-compatiblity-fix.patch \ 16 file://0005-Temporary-LLVM-12-compatiblity-fix.patch \
17 file://0001-LLVM-13-fixes.patch \
17 " 18 "
18 19
19SRCREV = "5d5672d6cc0c415dae76648390026f777004bd99" 20SRCREV = "5d5672d6cc0c415dae76648390026f777004bd99"
@@ -25,6 +26,8 @@ S = "${WORKDIR}/git"
25 26
26inherit cmake 27inherit cmake
27 28
29CXXFLAGS:append = " -Wno-error=deprecated-declarations"
30
28COMPATIBLE_HOST = '(x86_64).*-linux' 31COMPATIBLE_HOST = '(x86_64).*-linux'
29COMPATIBLE_HOST:libc-musl = "null" 32COMPATIBLE_HOST:libc-musl = "null"
30 33