1 |
commit: ff79850f5ff41c74cf8a70cab355a5803bfa648c |
2 |
Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jun 30 21:35:06 2022 +0000 |
4 |
Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jun 30 21:45:54 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ff79850f |
7 |
|
8 |
dev-util/intel-graphics-compiler: add 1.0.11485 |
9 |
|
10 |
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org> |
11 |
|
12 |
dev-util/intel-graphics-compiler/Manifest | 1 + |
13 |
...aphics-compiler-1.0.11485-fix-BiF-caching.patch | 49 ++++++ |
14 |
...phics-compiler-1.0.11485-include-opencl-c.patch | 11 ++ |
15 |
...mpiler-1.0.11485-update-raytracing-llvm14.patch | 186 +++++++++++++++++++++ |
16 |
...compiler-1.0.11485-wrap-getNumArgOperands.patch | 24 +++ |
17 |
.../intel-graphics-compiler-1.0.11485.ebuild | 88 ++++++++++ |
18 |
6 files changed, 359 insertions(+) |
19 |
|
20 |
diff --git a/dev-util/intel-graphics-compiler/Manifest b/dev-util/intel-graphics-compiler/Manifest |
21 |
index 0abfe62ca8e0..42d67d67a296 100644 |
22 |
--- a/dev-util/intel-graphics-compiler/Manifest |
23 |
+++ b/dev-util/intel-graphics-compiler/Manifest |
24 |
@@ -1 +1,2 @@ |
25 |
DIST intel-graphics-compiler-1.0.11378.tar.gz 8809420 BLAKE2B d503b962193daf3731864739bc0efb753baed3603795e04941d17dcdcaf9e971787ffa877e8295054de41d889a39e2bdbf8119fb7d60110580acea3c24cefc58 SHA512 f3daedfe36badfe07f187b38c9a4da98116533940f4d910fbbd060813aeb1e3ffaa627a72180e66736748830a80cfca4c2a6dc9c8e9507884629e3e55add1cbb |
26 |
+DIST intel-graphics-compiler-1.0.11485.tar.gz 8831925 BLAKE2B 7e2bcb37b4c34bb01788a8d75fc42498223b6193421cb726c21ce7949181757a10d112ae151736cd9283ba6ed8f0625597fb1f2a61229a7352e7f1f5ec34d1d0 SHA512 03fb571fdd61daea3a5c61ff75a146bd98b9b92dfd8bc1957143fe127977f5111df680ac86769d3c1fa1801ba2012b600b1ff844b318ce64460f2d042c4ae65b |
27 |
|
28 |
diff --git a/dev-util/intel-graphics-compiler/files/intel-graphics-compiler-1.0.11485-fix-BiF-caching.patch b/dev-util/intel-graphics-compiler/files/intel-graphics-compiler-1.0.11485-fix-BiF-caching.patch |
29 |
new file mode 100644 |
30 |
index 000000000000..7ad261e0aa6c |
31 |
--- /dev/null |
32 |
+++ b/dev-util/intel-graphics-compiler/files/intel-graphics-compiler-1.0.11485-fix-BiF-caching.patch |
33 |
@@ -0,0 +1,49 @@ |
34 |
+From 12c99343388eba6e6275856b25e0fa8978585dfb Mon Sep 17 00:00:00 2001 |
35 |
+From: Marcin Naczk <marcin.naczk@×××××.com> |
36 |
+Date: Mon, 13 Jun 2022 08:28:24 +0000 |
37 |
+Subject: [PATCH] Find OpenCl-c.h when clang is take from system. |
38 |
+ |
39 |
+Find OpenCl-c.h when clang is take from system. |
40 |
+--- |
41 |
+ IGC/cmake/igc_find_opencl_clang.cmake | 24 +++++++++++++++--------- |
42 |
+ 1 file changed, 15 insertions(+), 9 deletions(-) |
43 |
+ |
44 |
+diff --git a/IGC/cmake/igc_find_opencl_clang.cmake b/IGC/cmake/igc_find_opencl_clang.cmake |
45 |
+index dc8924fb7ee..0a54ac68249 100644 |
46 |
+--- a/IGC/cmake/igc_find_opencl_clang.cmake |
47 |
++++ b/IGC/cmake/igc_find_opencl_clang.cmake |
48 |
+@@ -94,19 +94,25 @@ if(CCLANG_FROM_SYSTEM) |
49 |
+ else() |
50 |
+ set_property(TARGET opencl-clang-lib PROPERTY "IMPORTED_LOCATION" "${SYSTEM_COMMON_CLANG}") |
51 |
+ endif() |
52 |
+- find_program(CLANG_GE7 clang-${LLVM_VERSION_MAJOR}) |
53 |
+- if(CLANG_GE7) |
54 |
+- message(STATUS "[IGC] Found clang-${LLVM_VERSION_MAJOR} executable: ${CLANG_GE7}") |
55 |
++ find_program(CLANG_EXE clang-${LLVM_VERSION_MAJOR}) |
56 |
++ if(CLANG_EXE) |
57 |
++ message(STATUS "[IGC] Found clang-${LLVM_VERSION_MAJOR} executable: ${CLANG_EXE}") |
58 |
+ |
59 |
+ add_executable(clang-tool IMPORTED GLOBAL) |
60 |
+- set_property(TARGET clang-tool PROPERTY "IMPORTED_LOCATION" "${CLANG_GE7}") |
61 |
++ set_property(TARGET clang-tool PROPERTY "IMPORTED_LOCATION" "${CLANG_EXE}") |
62 |
+ set(CL_OPTIONS "-finclude-default-header") |
63 |
+- if(LLVM_VERSION_MAJOR VERSION_EQUAL 7) |
64 |
+- message(WARNING "[IGC] : clang-7 should be patched with VME patch (https://reviews.llvm.org/D51484). Assuming that it is. If not, please add -DVME_TYPES_DEFINED=FALSE.") |
65 |
+- endif() |
66 |
+- else(CLANG_GE7) |
67 |
++ |
68 |
++ # Get parent dir of the location of CLANG_EXE |
69 |
++ get_filename_component(CLANG_EXE_PARENT_DIR ${CLANG_EXE} DIRECTORY) |
70 |
++ file(GLOB_RECURSE opencl-header ${CLANG_EXE_PARENT_DIR}/../*opencl-c.h) |
71 |
++ if(opencl-header) |
72 |
++ message(STATUS "[IGC] Found opencl-c.h: ${opencl-header}") |
73 |
++ else(opencl-header) |
74 |
++ message(FATAL_ERROR "[IGC] : Couldn't find opencl-c.h, please provide it.") |
75 |
++ endif(opencl-header) |
76 |
++ else(CLANG_EXE) |
77 |
+ message(FATAL_ERROR "[IGC] : Couldn't find clang-${LLVM_VERSION_MAJOR} executable, please install it.") |
78 |
+- endif(CLANG_GE7) |
79 |
++ endif(CLANG_EXE) |
80 |
+ ### |
81 |
+ #2. CCLANG_BUILD_PREBUILDS - use prebuilt opencl-clang toolchain |
82 |
+ elseif(${CCLANG_BUILD_PREBUILDS}) |
83 |
|
84 |
diff --git a/dev-util/intel-graphics-compiler/files/intel-graphics-compiler-1.0.11485-include-opencl-c.patch b/dev-util/intel-graphics-compiler/files/intel-graphics-compiler-1.0.11485-include-opencl-c.patch |
85 |
new file mode 100644 |
86 |
index 000000000000..dbf4188ad0bc |
87 |
--- /dev/null |
88 |
+++ b/dev-util/intel-graphics-compiler/files/intel-graphics-compiler-1.0.11485-include-opencl-c.patch |
89 |
@@ -0,0 +1,11 @@ |
90 |
+--- a/IGC/cmake/igc_find_opencl_clang.cmake |
91 |
++++ b/IGC/cmake/igc_find_opencl_clang.cmake |
92 |
+@@ -104,7 +104,7 @@ |
93 |
+ |
94 |
+ # Get parent dir of the location of CLANG_EXE |
95 |
+ get_filename_component(CLANG_EXE_PARENT_DIR ${CLANG_EXE} DIRECTORY) |
96 |
+- file(GLOB_RECURSE opencl-header ${CLANG_EXE_PARENT_DIR}/../*opencl-c.h) |
97 |
++ file(GLOB_RECURSE opencl-header ${CCLANG_INCLUDE_PREBUILDS_DIR}/*opencl-c.h) |
98 |
+ if(opencl-header) |
99 |
+ message(STATUS "[IGC] Found opencl-c.h: ${opencl-header}") |
100 |
+ else(opencl-header) |
101 |
|
102 |
diff --git a/dev-util/intel-graphics-compiler/files/intel-graphics-compiler-1.0.11485-update-raytracing-llvm14.patch b/dev-util/intel-graphics-compiler/files/intel-graphics-compiler-1.0.11485-update-raytracing-llvm14.patch |
103 |
new file mode 100644 |
104 |
index 000000000000..248f8244e32f |
105 |
--- /dev/null |
106 |
+++ b/dev-util/intel-graphics-compiler/files/intel-graphics-compiler-1.0.11485-update-raytracing-llvm14.patch |
107 |
@@ -0,0 +1,186 @@ |
108 |
+From d9535cc5c3e54b21d56c492d4e21cb13c80b9b7a Mon Sep 17 00:00:00 2001 |
109 |
+From: Artem Gindinson <artem.gindinson@×××××.com> |
110 |
+Date: Wed, 22 Jun 2022 11:53:02 +0000 |
111 |
+Subject: [PATCH] Update RayTracing for full LLVM 14 buildability |
112 |
+ |
113 |
+- Address further casting issues |
114 |
+- Use pre-existing LLVM wrappers for function argument manipulations |
115 |
+- Create & use LLVM wrappers for `AAQueryInfo` and |
116 |
+ `CallBase::getRetDereferenceableBytes()` |
117 |
+--- |
118 |
+ IGC/AdaptorCommon/RayTracing/AllocaTracking.cpp | 3 ++- |
119 |
+ IGC/AdaptorCommon/RayTracing/InlineDataPass.cpp | 3 ++- |
120 |
+ IGC/AdaptorCommon/RayTracing/LowerIntersectionAnyHit.cpp | 2 +- |
121 |
+ IGC/AdaptorCommon/RayTracing/RTSpillShrinkPass.cpp | 4 ++-- |
122 |
+ IGC/AdaptorCommon/RayTracing/RayTracingFinalizePass.cpp | 4 ++-- |
123 |
+ IGC/AdaptorCommon/RayTracing/StackIDSchedulingPass.cpp | 3 ++- |
124 |
+ IGC/AdaptorCommon/TypesLegalizationPass.cpp | 2 +- |
125 |
+ .../include/llvmWrapper/Analysis/AliasAnalysis.h | 7 +++++++ |
126 |
+ IGC/WrapperLLVM/include/llvmWrapper/IR/InstrTypes.h | 9 +++++++++ |
127 |
+ 9 files changed, 28 insertions(+), 9 deletions(-) |
128 |
+ |
129 |
+diff --git a/IGC/AdaptorCommon/RayTracing/AllocaTracking.cpp b/IGC/AdaptorCommon/RayTracing/AllocaTracking.cpp |
130 |
+index b5ad27e32ca..67cf302495c 100644 |
131 |
+--- a/IGC/AdaptorCommon/RayTracing/AllocaTracking.cpp |
132 |
++++ b/IGC/AdaptorCommon/RayTracing/AllocaTracking.cpp |
133 |
+@@ -19,6 +19,7 @@ SPDX-License-Identifier: MIT |
134 |
+ #include "common/LLVMWarningsPush.hpp" |
135 |
+ #include <llvm/IR/Instruction.h> |
136 |
+ #include <llvm/IR/IntrinsicInst.h> |
137 |
++#include <llvmWrapper/IR/Instructions.h> |
138 |
+ #include "common/LLVMWarningsPop.hpp" |
139 |
+ |
140 |
+ using namespace llvm; |
141 |
+@@ -129,7 +130,7 @@ void rewriteTypes( |
142 |
+ "Only handles void right now!"); |
143 |
+ |
144 |
+ SmallVector<Type*, 4> Tys; |
145 |
+- for (auto &Op : II->arg_operands()) |
146 |
++ for (auto &Op : IGCLLVM::args(II)) |
147 |
+ Tys.push_back(Op->getType()); |
148 |
+ |
149 |
+ auto* NewFTy = FunctionType::get( |
150 |
+diff --git a/IGC/AdaptorCommon/RayTracing/InlineDataPass.cpp b/IGC/AdaptorCommon/RayTracing/InlineDataPass.cpp |
151 |
+index 5e4df4e1a86..9433340d259 100644 |
152 |
+--- a/IGC/AdaptorCommon/RayTracing/InlineDataPass.cpp |
153 |
++++ b/IGC/AdaptorCommon/RayTracing/InlineDataPass.cpp |
154 |
+@@ -46,6 +46,7 @@ SPDX-License-Identifier: MIT |
155 |
+ #include <vector> |
156 |
+ #include "common/LLVMWarningsPush.hpp" |
157 |
+ #include <llvm/IR/InstIterator.h> |
158 |
++#include <llvmWrapper/IR/InstrTypes.h> |
159 |
+ #include "common/LLVMWarningsPop.hpp" |
160 |
+ |
161 |
+ using namespace llvm; |
162 |
+@@ -155,7 +156,7 @@ bool BindlessInlineDataPass::runOnModule(Module &M) |
163 |
+ // the size of the Shader Identifier + the size of the Local arguments |
164 |
+ const uint64_t dereferenceable_size = |
165 |
+ sizeof(ShaderIdentifier) + |
166 |
+- local_buffer_ptr->getDereferenceableBytes(AttributeList::ReturnIndex); |
167 |
++ IGCLLVM::getRetDereferenceableBytes(local_buffer_ptr); |
168 |
+ |
169 |
+ // Return a CallInst* representing the InlinedData intrinsic call |
170 |
+ // In the shader dumps, |
171 |
+diff --git a/IGC/AdaptorCommon/RayTracing/LowerIntersectionAnyHit.cpp b/IGC/AdaptorCommon/RayTracing/LowerIntersectionAnyHit.cpp |
172 |
+index 8b6bba69f23..2c3a98d04e3 100644 |
173 |
+--- a/IGC/AdaptorCommon/RayTracing/LowerIntersectionAnyHit.cpp |
174 |
++++ b/IGC/AdaptorCommon/RayTracing/LowerIntersectionAnyHit.cpp |
175 |
+@@ -449,7 +449,7 @@ CallInst* LowerIntersectionAnyHit::codeGenReportHit( |
176 |
+ CustomHitAttrPtr, |
177 |
+ 4, |
178 |
+ Attrs, |
179 |
+- std::min(4U, DL.getABITypeAlignment(AttrTy->getPointerElementType())), |
180 |
++ std::min(4U, (unsigned)DL.getABITypeAlignment(AttrTy->getPointerElementType())), |
181 |
+ IRB.getInt64(DL.getTypeAllocSize(AttrTy->getPointerElementType()))); |
182 |
+ } |
183 |
+ |
184 |
+diff --git a/IGC/AdaptorCommon/RayTracing/RTSpillShrinkPass.cpp b/IGC/AdaptorCommon/RayTracing/RTSpillShrinkPass.cpp |
185 |
+index 4d42b32af36..d8d7ac3c54f 100644 |
186 |
+--- a/IGC/AdaptorCommon/RayTracing/RTSpillShrinkPass.cpp |
187 |
++++ b/IGC/AdaptorCommon/RayTracing/RTSpillShrinkPass.cpp |
188 |
+@@ -61,9 +61,9 @@ class RTSpillShrinkPass : public FunctionPass |
189 |
+ |
190 |
+ unsigned getAlignment(const DataLayout& DL, StoreInst* ST) const |
191 |
+ { |
192 |
+- unsigned Align = ST->getAlignment(); |
193 |
++ unsigned Align = (unsigned)ST->getAlignment(); |
194 |
+ if (Align == 0) |
195 |
+- Align = DL.getABITypeAlignment(ST->getType()); |
196 |
++ Align = (unsigned)DL.getABITypeAlignment(ST->getType()); |
197 |
+ return Align; |
198 |
+ } |
199 |
+ |
200 |
+diff --git a/IGC/AdaptorCommon/RayTracing/RayTracingFinalizePass.cpp b/IGC/AdaptorCommon/RayTracing/RayTracingFinalizePass.cpp |
201 |
+index 87549a6ce85..797e77a548d 100644 |
202 |
+--- a/IGC/AdaptorCommon/RayTracing/RayTracingFinalizePass.cpp |
203 |
++++ b/IGC/AdaptorCommon/RayTracing/RayTracingFinalizePass.cpp |
204 |
+@@ -114,7 +114,7 @@ bool RayTracingFinalizePass::runOnModule(Module &M) |
205 |
+ { |
206 |
+ // Temporary WA to ensure we don't page fault on unaligned |
207 |
+ // acceses. |
208 |
+- uint32_t Align = LI->getAlignment(); |
209 |
++ uint32_t Align = (uint32_t)LI->getAlignment(); |
210 |
+ if (Align == 0) |
211 |
+ Align = (uint32_t)DL.getTypeAllocSize(LI->getType()); |
212 |
+ |
213 |
+@@ -125,7 +125,7 @@ bool RayTracingFinalizePass::runOnModule(Module &M) |
214 |
+ { |
215 |
+ // Temporary WA to ensure we don't page fault on unaligned |
216 |
+ // acceses. |
217 |
+- uint32_t Align = SI->getAlignment(); |
218 |
++ uint32_t Align = (uint32_t)SI->getAlignment(); |
219 |
+ if (Align == 0) |
220 |
+ Align = (uint32_t)DL.getTypeAllocSize( |
221 |
+ SI->getValueOperand()->getType()); |
222 |
+diff --git a/IGC/AdaptorCommon/RayTracing/StackIDSchedulingPass.cpp b/IGC/AdaptorCommon/RayTracing/StackIDSchedulingPass.cpp |
223 |
+index db5490267fd..d352b67a50f 100644 |
224 |
+--- a/IGC/AdaptorCommon/RayTracing/StackIDSchedulingPass.cpp |
225 |
++++ b/IGC/AdaptorCommon/RayTracing/StackIDSchedulingPass.cpp |
226 |
+@@ -49,6 +49,7 @@ SPDX-License-Identifier: MIT |
227 |
+ #include <llvm/IR/Dominators.h> |
228 |
+ #include <llvm/Analysis/PostDominators.h> |
229 |
+ #include <llvm/Analysis/LoopInfo.h> |
230 |
++#include "llvmWrapper/Analysis/AliasAnalysis.h" |
231 |
+ #include "llvmWrapper/Analysis/MemoryLocation.h" |
232 |
+ #include "common/LLVMWarningsPop.hpp" |
233 |
+ |
234 |
+@@ -175,7 +176,7 @@ BasicBlock* StackIDSchedulingPass::schedule( |
235 |
+ ModRefInfo StackIDSchedulingPass::getModRefInfo( |
236 |
+ const CallBase* Call, const MemoryLocation& Loc) |
237 |
+ { |
238 |
+- AAQueryInfo AAQIP; |
239 |
++ AAQueryInfo AAQIP = IGCLLVM::makeAAQueryInfo(); |
240 |
+ return AA->getModRefInfo(Call, Loc, AAQIP); |
241 |
+ } |
242 |
+ |
243 |
+diff --git a/IGC/AdaptorCommon/TypesLegalizationPass.cpp b/IGC/AdaptorCommon/TypesLegalizationPass.cpp |
244 |
+index c3570f39d31..10da29ee242 100644 |
245 |
+--- a/IGC/AdaptorCommon/TypesLegalizationPass.cpp |
246 |
++++ b/IGC/AdaptorCommon/TypesLegalizationPass.cpp |
247 |
+@@ -207,7 +207,7 @@ TypesLegalizationPass::ResolveValue( Instruction *ip,Value *val,SmallVector<unsi |
248 |
+ { |
249 |
+ IGCLLVM::IRBuilder<> builder( ld ); |
250 |
+ Value* gep = CreateGEP( builder,ld->getOperand( 0 ),indices ); |
251 |
+- unsigned alignment = ld->getAlignment(); |
252 |
++ unsigned alignment = (unsigned)ld->getAlignment(); |
253 |
+ unsigned pointerTypeSize = gep->getType()->getPointerElementType()->getScalarSizeInBits() / 8; |
254 |
+ if ( alignment && pointerTypeSize == alignment ) |
255 |
+ return builder.CreateAlignedLoad( gep, IGCLLVM::getAlign(alignment) ); |
256 |
+diff --git a/IGC/WrapperLLVM/include/llvmWrapper/Analysis/AliasAnalysis.h b/IGC/WrapperLLVM/include/llvmWrapper/Analysis/AliasAnalysis.h |
257 |
+index 873886cc860..385c04db970 100644 |
258 |
+--- a/IGC/WrapperLLVM/include/llvmWrapper/Analysis/AliasAnalysis.h |
259 |
++++ b/IGC/WrapperLLVM/include/llvmWrapper/Analysis/AliasAnalysis.h |
260 |
+@@ -19,6 +19,13 @@ namespace IGCLLVM |
261 |
+ #else |
262 |
+ using AliasResultEnum = llvm::AliasResult::Kind; |
263 |
+ #endif |
264 |
++inline llvm::AAQueryInfo makeAAQueryInfo() { |
265 |
++#if LLVM_VERSION_MAJOR >= 14 |
266 |
++ return llvm::AAQueryInfo(new llvm::SimpleCaptureInfo()); |
267 |
++#else |
268 |
++ return llvm::AAQueryInfo(); |
269 |
++#endif |
270 |
++} |
271 |
+ } |
272 |
+ |
273 |
+ #endif |
274 |
+diff --git a/IGC/WrapperLLVM/include/llvmWrapper/IR/InstrTypes.h b/IGC/WrapperLLVM/include/llvmWrapper/IR/InstrTypes.h |
275 |
+index 569eece3fb5..1050c842271 100644 |
276 |
+--- a/IGC/WrapperLLVM/include/llvmWrapper/IR/InstrTypes.h |
277 |
++++ b/IGC/WrapperLLVM/include/llvmWrapper/IR/InstrTypes.h |
278 |
+@@ -50,6 +50,15 @@ namespace IGCLLVM |
279 |
+ CI->addFnAttr(Kind); |
280 |
+ #else |
281 |
+ CI->addAttribute(llvm::AttributeList::FunctionIndex, Kind); |
282 |
++#endif |
283 |
++ } |
284 |
++ |
285 |
++ inline uint64_t getRetDereferenceableBytes(llvm::CallBase* Call) |
286 |
++ { |
287 |
++#if LLVM_VERSION_MAJOR >= 14 |
288 |
++ return Call->getRetDereferenceableBytes(); |
289 |
++#else |
290 |
++ return Call->getDereferenceableBytes(llvm::AttributeList::ReturnIndex); |
291 |
+ #endif |
292 |
+ } |
293 |
+ } |
294 |
|
295 |
diff --git a/dev-util/intel-graphics-compiler/files/intel-graphics-compiler-1.0.11485-wrap-getNumArgOperands.patch b/dev-util/intel-graphics-compiler/files/intel-graphics-compiler-1.0.11485-wrap-getNumArgOperands.patch |
296 |
new file mode 100644 |
297 |
index 000000000000..23754ccb6b4b |
298 |
--- /dev/null |
299 |
+++ b/dev-util/intel-graphics-compiler/files/intel-graphics-compiler-1.0.11485-wrap-getNumArgOperands.patch |
300 |
@@ -0,0 +1,24 @@ |
301 |
+From 1d5ceafdbc005f3adc58be5af1dc92f068908e16 Mon Sep 17 00:00:00 2001 |
302 |
+From: Artem Gindinson <artem.gindinson@×××××.com> |
303 |
+Date: Mon, 20 Jun 2022 12:38:04 +0000 |
304 |
+Subject: [PATCH] Wrap CallInst::getNumArgOperands calls for LLVM 14 |
305 |
+ |
306 |
+Rework all remaining call sites to rely on the already-existing wrapper |
307 |
+function. |
308 |
+--- |
309 |
+ IGC/Compiler/CISACodeGen/HFpackingOpt.cpp | 2 +- |
310 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
311 |
+ |
312 |
+diff --git a/IGC/Compiler/CISACodeGen/HFpackingOpt.cpp b/IGC/Compiler/CISACodeGen/HFpackingOpt.cpp |
313 |
+index 69d6151f8bf..e24362d7791 100644 |
314 |
+--- a/IGC/Compiler/CISACodeGen/HFpackingOpt.cpp |
315 |
++++ b/IGC/Compiler/CISACodeGen/HFpackingOpt.cpp |
316 |
+@@ -825,7 +825,7 @@ bool HFpackingOpt::findStoreSequence(std::vector<Instruction*>& path, std::vecto |
317 |
+ uint srciCount = inst->getNumOperands(); |
318 |
+ if (CallInst* cinst = dyn_cast<CallInst>(inst)) |
319 |
+ { |
320 |
+- srciCount = cinst->getNumArgOperands(); |
321 |
++ srciCount = IGCLLVM::getNumArgOperands(cinst); |
322 |
+ } |
323 |
+ |
324 |
+ for (uint srci = 0; srci < srciCount; srci++) |
325 |
|
326 |
diff --git a/dev-util/intel-graphics-compiler/intel-graphics-compiler-1.0.11485.ebuild b/dev-util/intel-graphics-compiler/intel-graphics-compiler-1.0.11485.ebuild |
327 |
new file mode 100644 |
328 |
index 000000000000..74f02de2f3a1 |
329 |
--- /dev/null |
330 |
+++ b/dev-util/intel-graphics-compiler/intel-graphics-compiler-1.0.11485.ebuild |
331 |
@@ -0,0 +1,88 @@ |
332 |
+# Copyright 1999-2022 Gentoo Authors |
333 |
+# Distributed under the terms of the GNU General Public License v2 |
334 |
+ |
335 |
+EAPI=8 |
336 |
+ |
337 |
+CMAKE_BUILD_TYPE="Release" |
338 |
+LLVM_MAX_SLOT="13" |
339 |
+MY_PN="igc" |
340 |
+MY_P="${MY_PN}-${PV}" |
341 |
+PYTHON_COMPAT=( python3_{8..11} ) |
342 |
+ |
343 |
+inherit cmake flag-o-matic llvm python-any-r1 |
344 |
+ |
345 |
+DESCRIPTION="LLVM-based OpenCL compiler for OpenCL targetting Intel Gen graphics hardware" |
346 |
+HOMEPAGE="https://github.com/intel/intel-graphics-compiler" |
347 |
+SRC_URI="https://github.com/intel/${PN}/archive/${MY_P}.tar.gz -> ${P}.tar.gz" |
348 |
+S="${WORKDIR}/${PN}-${MY_P}" |
349 |
+ |
350 |
+LICENSE="MIT" |
351 |
+SLOT="0" |
352 |
+KEYWORDS="~amd64" |
353 |
+IUSE="debug" |
354 |
+ |
355 |
+DEPEND=" |
356 |
+ dev-libs/opencl-clang:${LLVM_MAX_SLOT}= |
357 |
+ dev-util/spirv-tools |
358 |
+ =sys-devel/lld-${LLVM_MAX_SLOT}* |
359 |
+ sys-devel/llvm:${LLVM_MAX_SLOT}= |
360 |
+" |
361 |
+ |
362 |
+RDEPEND="${DEPEND}" |
363 |
+ |
364 |
+BDEPEND=" |
365 |
+ =sys-devel/lld-${LLVM_MAX_SLOT}* |
366 |
+ ${PYTHON_DEPS} |
367 |
+" |
368 |
+ |
369 |
+PATCHES=( |
370 |
+ "${FILESDIR}/${PN}-1.0.9-no_Werror.patch" |
371 |
+ "${FILESDIR}/${PN}-1.0.8173-opencl-clang_version.patch" |
372 |
+ "${FILESDIR}/${PN}-1.0.8365-disable-git.patch" |
373 |
+ "${FILESDIR}/${PN}-1.0.11485-fix-BiF-caching.patch" |
374 |
+ "${FILESDIR}/${PN}-1.0.11485-update-raytracing-llvm14.patch" |
375 |
+ "${FILESDIR}/${PN}-1.0.11485-wrap-getNumArgOperands.patch" |
376 |
+ "${FILESDIR}/${PN}-1.0.11485-include-opencl-c.patch" |
377 |
+) |
378 |
+ |
379 |
+pkg_setup() { |
380 |
+ llvm_pkg_setup |
381 |
+ python-any-r1_pkg_setup |
382 |
+} |
383 |
+ |
384 |
+src_configure() { |
385 |
+ # Get LLVM version |
386 |
+ local llvm_version="$(best_version -d sys-devel/llvm:${LLVM_MAX_SLOT})" |
387 |
+ |
388 |
+ # See https://github.com/intel/intel-graphics-compiler/issues/212 |
389 |
+ append-ldflags -Wl,-z,undefs |
390 |
+ |
391 |
+ # See https://bugs.gentoo.org/718824 |
392 |
+ ! use debug && append-cppflags -DNDEBUG |
393 |
+ |
394 |
+ local mycmakeargs=( |
395 |
+ -DCCLANG_INCLUDE_PREBUILDS_DIR="/usr/lib/clang/${llvm_version##*-}/include" |
396 |
+ -DCCLANG_SONAME_VERSION="${LLVM_MAX_SLOT}" |
397 |
+ -DCMAKE_LIBRARY_PATH="$(get_llvm_prefix ${LLVM_MAX_SLOT})/$(get_libdir)" |
398 |
+ -DIGC_OPTION__ARCHITECTURE_TARGET="Linux64" |
399 |
+ -DIGC_OPTION__CLANG_MODE="Prebuilds" |
400 |
+ -DIGC_OPTION__LINK_KHRONOS_SPIRV_TRANSLATOR="ON" |
401 |
+ -DIGC_OPTION__LLD_MODE="Prebuilds" |
402 |
+ -DIGC_OPTION__LLDELF_H_DIR="${EPREFIX}/usr/include/lld/Common" |
403 |
+ -DIGC_OPTION__LLVM_MODE="Prebuilds" |
404 |
+ -DIGC_OPTION__LLVM_PREFERRED_VERSION="${llvm_version##*-}" |
405 |
+ -DIGC_OPTION__SPIRV_TOOLS_MODE="Prebuilds" |
406 |
+ -DIGC_OPTION__SPIRV_TRANSLATOR_MODE="Prebuilds" |
407 |
+ -DIGC_OPTION__USE_PREINSTALLED_SPRIV_HEADERS="ON" |
408 |
+ -DINSTALL_GENX_IR="ON" |
409 |
+ -DSPIRVLLVMTranslator_INCLUDE_DIR="${EPREFIX}/usr/lib/llvm/${LLVM_MAX_SLOT}/include/LLVMSPIRVLib" |
410 |
+ -Wno-dev |
411 |
+ |
412 |
+ # Compilation with VectorCompiler causes currently a segfault. |
413 |
+ # See https://github.com/intel/intel-graphics-compiler/issues/236 |
414 |
+ -DIGC_BUILD__VC_ENABLED="OFF" |
415 |
+ # -DIGC_OPTION__VC_INTRINSICS_MODE="Prebuilds" |
416 |
+ ) |
417 |
+ |
418 |
+ cmake_src_configure |
419 |
+} |