diff options
Diffstat (limited to 'dynamic-layers/clang-layer/recipes-opencl/igc')
9 files changed, 199 insertions, 568 deletions
diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-BiF-CMakeLists.txt-remove-opt-from-DEPENDS.patch b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-BiF-CMakeLists.txt-remove-opt-from-DEPENDS.patch new file mode 100644 index 00000000..377081fd --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-BiF-CMakeLists.txt-remove-opt-from-DEPENDS.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From 3d71670f8ad5b54d434c2f5f71713bb1d5433ae4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Anuj Mittal <anuj.mittal@intel.com> | ||
3 | Date: Tue, 12 Oct 2021 23:46:42 +0800 | ||
4 | Subject: [PATCH] BiF/CMakeLists.txt: remove opt from DEPENDS | ||
5 | |||
6 | Otherwise it starts failing with: | ||
7 | |||
8 | | ninja: error: 'IGC/VectorCompiler/lib/BiF/opt', needed by 'IGC/VectorCompiler/lib/BiF/VCBiFPrintfOCL32.opt.bc', missing and no known rule to make it | ||
9 | |||
10 | We don't need to explicitly make sure opt is built when | ||
11 | using prebuilt binaries. | ||
12 | |||
13 | Upstream-Status: Inappropriate | ||
14 | |||
15 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
16 | --- | ||
17 | IGC/VectorCompiler/lib/BiF/cmake/Functions.cmake | 2 +- | ||
18 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
19 | |||
20 | diff --git a/IGC/VectorCompiler/lib/BiF/cmake/Functions.cmake b/IGC/VectorCompiler/lib/BiF/cmake/Functions.cmake | ||
21 | index d20d7f887..882e09fea 100644 | ||
22 | --- a/IGC/VectorCompiler/lib/BiF/cmake/Functions.cmake | ||
23 | +++ b/IGC/VectorCompiler/lib/BiF/cmake/Functions.cmake | ||
24 | @@ -109,7 +109,7 @@ function(vc_build_bif TARGET RES_FILE CMCL_SRC_PATH BIF_NAME PTR_BIT_SIZE) | ||
25 | COMMENT "vc_build_bif: Translating CMCL builtins: ${BIF_CLANG_BC_NAME_FINAL} -> ${BIF_OPT_BC_NAME}" | ||
26 | COMMAND CMCLTranslatorTool -o ${BIF_CMCL_BC_NAME} ${BIF_CLANG_BC_NAME_FINAL} | ||
27 | COMMAND ${LLVM_OPT_EXE} ${IGC_LLVM_DEPENDENT_OPT_FLAGS} --O2 -o ${BIF_OPT_BC_NAME} ${BIF_CMCL_BC_NAME} | ||
28 | - DEPENDS CMCLTranslatorTool ${LLVM_OPT_EXE} ${BIF_CLANG_BC_PATH_FINAL} | ||
29 | + DEPENDS CMCLTranslatorTool ${BIF_CLANG_BC_PATH_FINAL} | ||
30 | BYPRODUCTS ${BIF_OPT_BC_PATH} | ||
31 | SOURCES ${CMCL_SRC_PATH}) | ||
32 | set(${RES_FILE} ${BIF_OPT_BC_NAME} PARENT_SCOPE) | ||
33 | -- | ||
34 | 2.43.2 | ||
35 | |||
diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-external-SPIRV-Tools-change-path-to-tools-and-header.patch b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-external-SPIRV-Tools-change-path-to-tools-and-header.patch new file mode 100644 index 00000000..dca75e22 --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-external-SPIRV-Tools-change-path-to-tools-and-header.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | From e69a3181482e5f442756a61c7b683914072884f1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Anuj Mittal <anuj.mittal@intel.com> | ||
3 | Date: Mon, 9 Jan 2023 11:43:05 +0800 | ||
4 | Subject: [PATCH] external/SPIRV-Tools: change path to tools and headers | ||
5 | |||
6 | We clone the SPIRV headers and tools in a different directory to ensure | ||
7 | file path substitutions take place. | ||
8 | |||
9 | Upstream-Status: Inappropriate | ||
10 | |||
11 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
12 | |||
13 | --- | ||
14 | external/SPIRV-Tools/CMakeLists.txt | 4 ++-- | ||
15 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
16 | |||
17 | diff --git a/external/SPIRV-Tools/CMakeLists.txt b/external/SPIRV-Tools/CMakeLists.txt | ||
18 | index 9afa5746c..7ca24d5dc 100644 | ||
19 | --- a/external/SPIRV-Tools/CMakeLists.txt | ||
20 | +++ b/external/SPIRV-Tools/CMakeLists.txt | ||
21 | @@ -43,8 +43,8 @@ else() #By default use build from sources | ||
22 | message(STATUS "[SPIRV-Tools] : Building from source") | ||
23 | message(STATUS "[SPIRV-Tools] : Current source dir: ${CMAKE_CURRENT_SOURCE_DIR}") | ||
24 | |||
25 | - set(SPIRV-Headers_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../SPIRV-Headers") # used in subdirectory | ||
26 | - set(SPIRV-Tools_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../SPIRV-Tools") | ||
27 | + set(SPIRV-Headers_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../SPIRV-Headers") # used in subdirectory | ||
28 | + set(SPIRV-Tools_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../SPIRV-Tools") | ||
29 | |||
30 | set(SPIRV-Tools_OUTPUT_DIR "${IGC_OPTION__OUTPUT_DIR}/external/SPIRV-Tools/build") | ||
31 | set(IGC_BUILD__SPIRV-Headers_DIR "${SPIRV-Headers_SOURCE_DIR}") | ||
diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-fix-tblgen.patch b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-fix-tblgen.patch new file mode 100644 index 00000000..39443931 --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-fix-tblgen.patch | |||
@@ -0,0 +1,24 @@ | |||
1 | From 5648568e597acd0fed82aac3e6aef0f95a1b78d1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Anuj Mittal <anuj.mittal@intel.com> | ||
3 | Date: Thu, 19 May 2022 22:50:09 +0800 | ||
4 | Subject: [PATCH] fix tblgen | ||
5 | |||
6 | Upstream-Status: Inappropriate [OE specific] | ||
7 | |||
8 | --- | ||
9 | IGC/cmake/igc_llvm.cmake | 2 +- | ||
10 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
11 | |||
12 | diff --git a/IGC/cmake/igc_llvm.cmake b/IGC/cmake/igc_llvm.cmake | ||
13 | index 10322533c..9020cb3c8 100644 | ||
14 | --- a/IGC/cmake/igc_llvm.cmake | ||
15 | +++ b/IGC/cmake/igc_llvm.cmake | ||
16 | @@ -52,7 +52,7 @@ else() | ||
17 | set(LLVM_OPT_EXE "opt" CACHE STRING "") | ||
18 | |||
19 | set(LLVM_TABLEGEN_EXE "llvm-tblgen") | ||
20 | - if(CMAKE_CROSSCOMPILING) | ||
21 | + if(TRUE) | ||
22 | if(DEFINED LLVM_TABLEGEN) | ||
23 | set(LLVM_TABLEGEN_EXE ${LLVM_TABLEGEN}) | ||
24 | else() | ||
diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-skip-execution-of-ElfPackager.patch b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-skip-execution-of-ElfPackager.patch deleted file mode 100644 index 3f3e1d49..00000000 --- a/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-skip-execution-of-ElfPackager.patch +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | From 4e903a6914d5124d616cf085e30e8cbaa20afb77 Mon Sep 17 00:00:00 2001 | ||
2 | From: Naveen Saini <naveen.kumar.saini@intel.com> | ||
3 | Date: Wed, 12 Jun 2019 14:10:23 +0800 | ||
4 | Subject: [PATCH 1/4] skip execution of ElfPackager | ||
5 | |||
6 | ElfPackager adds the ability to convert llvm bitcode into elf files for | ||
7 | easier partitioning. Skip for now until we start building a native | ||
8 | version for this. | ||
9 | |||
10 | Upstream-Status: Inappropriate [configuration specific] | ||
11 | |||
12 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
13 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
14 | --- | ||
15 | IGC/ElfPackager/CMakeLists.txt | 8 ++++---- | ||
16 | 1 file changed, 4 insertions(+), 4 deletions(-) | ||
17 | |||
18 | diff --git a/IGC/ElfPackager/CMakeLists.txt b/IGC/ElfPackager/CMakeLists.txt | ||
19 | index d9487aeb..bc728ada 100644 | ||
20 | --- a/IGC/ElfPackager/CMakeLists.txt | ||
21 | +++ b/IGC/ElfPackager/CMakeLists.txt | ||
22 | @@ -71,10 +71,10 @@ include_directories ( | ||
23 | ${IGC_SOURCE_DIR}/AdaptorOCL/CLElfLib/ | ||
24 | ) | ||
25 | |||
26 | -add_custom_command(TARGET ${IGC_BUILD__PROJ__ElfPackager} | ||
27 | - POST_BUILD | ||
28 | - COMMAND $<TARGET_FILE:${IGC_BUILD__PROJ__ElfPackager}> -includeSizet -funcList ${CMAKE_CURRENT_SOURCE_DIR}/function_bin.txt ${IGC_BUILD__BIF_DIR}/OCLBiFImpl.bc ${IGC_BUILD__BIF_DIR}/igdclbif.bin | ||
29 | - ) | ||
30 | +#add_custom_command(TARGET ${IGC_BUILD__PROJ__ElfPackager} | ||
31 | +# POST_BUILD | ||
32 | +# COMMAND $<TARGET_FILE:${IGC_BUILD__PROJ__ElfPackager}> -includeSizet -funcList ${CMAKE_CURRENT_SOURCE_DIR}/function_bin.txt ${IGC_BUILD__BIF_DIR}/OCLBiFImpl.bc ${IGC_BUILD__BIF_DIR}/igdclbif.bin | ||
33 | +# ) | ||
34 | |||
35 | |||
36 | add_dependencies("${IGC_BUILD__PROJ__ElfPackager}" "${IGC_BUILD__PROJ__BiFModule_OCL}") | ||
37 | -- | ||
38 | 2.17.1 | ||
39 | |||
diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/files/0002-comment-out-dump-functions.patch b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0002-comment-out-dump-functions.patch deleted file mode 100644 index 517dc36f..00000000 --- a/dynamic-layers/clang-layer/recipes-opencl/igc/files/0002-comment-out-dump-functions.patch +++ /dev/null | |||
@@ -1,87 +0,0 @@ | |||
1 | From 15a23e549636626cf32b062a5308a29cc53ce360 Mon Sep 17 00:00:00 2001 | ||
2 | From: Naveen Saini <naveen.kumar.saini@intel.com> | ||
3 | Date: Wed, 21 Aug 2019 17:29:00 +0800 | ||
4 | Subject: [PATCH 2/4] comment out dump functions | ||
5 | |||
6 | Otherwise it leads to errors when linking with lld: | ||
7 | |||
8 | | ld.lld: error: undefined symbol: llvm::Value::dump() const | ||
9 | | >>> referenced by PreRAScheduler.cpp:252 (build/tmp/work/x86_64-linux/intel-graphics-compiler-native/1.0.10-r0/git/IGC/Compiler/CISACodeGen/PreRAScheduler.cpp:252) | ||
10 | | >>> PreRAScheduler.cpp.o:(IGC::PreRAScheduler::dumpDDGContents()) in archive IGC/Release/libCompiler.a | ||
11 | | | ||
12 | | ld.lld: error: undefined symbol: llvm::Value::dump() const | ||
13 | | >>> referenced by PreRAScheduler.cpp:855 (build/tmp/work/x86_64-linux/intel-graphics-compiler-native/1.0.10-r0/git/IGC/Compiler/CISACodeGen/PreRAScheduler.cpp:855) | ||
14 | | >>> PreRAScheduler.cpp.o:(IGC::PreRAScheduler::dumpPriorityQueueContents()) in archive IGC/Release/libCompiler.a | ||
15 | | | ||
16 | | ld.lld: error: undefined symbol: llvm::Value::dump() const | ||
17 | | >>> referenced by PreRAScheduler.cpp:876 (build/tmp/work/x86_64-linux/intel-graphics-compiler-native/1.0.10-r0/git/IGC/Compiler/CISACodeGen/PreRAScheduler.cpp:876) | ||
18 | | >>> PreRAScheduler.cpp.o:(IGC::PreRAScheduler::dumpPriorityQueueContents()) in archive IGC/Release/libCompiler.a | ||
19 | | | ||
20 | | ld.lld: error: undefined symbol: llvm::Value::dump() const | ||
21 | | >>> referenced by PreRAScheduler.cpp:888 (build/tmp/work/x86_64-linux/intel-graphics-compiler-native/1.0.10-r0/git/IGC/Compiler/CISACodeGen/PreRAScheduler.cpp:888) | ||
22 | | >>> PreRAScheduler.cpp.o:(IGC::PreRAScheduler::dumpPriorityQueueContents()) in archive IGC/Release/libCompiler.a | ||
23 | | | ||
24 | | ld.lld: error: undefined symbol: llvm::Value::dump() const | ||
25 | | >>> referenced by PreRAScheduler.cpp:902 (build/tmp/work/x86_64-linux/intel-graphics-compiler-native/1.0.10-r0/git/IGC/Compiler/CISACodeGen/PreRAScheduler.cpp:902) | ||
26 | | >>> PreRAScheduler.cpp.o:(IGC::PreRAScheduler::dumpPriorityQueueContents()) in archive IGC/Release/libCompiler.a | ||
27 | | clang-8: error: linker command failed with exit code 1 (use -v to see invocation) | ||
28 | | ninja: build stopped: subcommand failed. | ||
29 | |||
30 | Upstream-Status: Submitted [https://github.com/intel/intel-graphics-compiler/pull/105] | ||
31 | |||
32 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
33 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
34 | --- | ||
35 | IGC/Compiler/CISACodeGen/PreRAScheduler.cpp | 6 ++++++ | ||
36 | 1 file changed, 6 insertions(+) | ||
37 | |||
38 | diff --git a/IGC/Compiler/CISACodeGen/PreRAScheduler.cpp b/IGC/Compiler/CISACodeGen/PreRAScheduler.cpp | ||
39 | index 62e89c0c..ba01af01 100644 | ||
40 | --- a/IGC/Compiler/CISACodeGen/PreRAScheduler.cpp | ||
41 | +++ b/IGC/Compiler/CISACodeGen/PreRAScheduler.cpp | ||
42 | @@ -178,8 +178,10 @@ namespace IGC { | ||
43 | AU.addRequired<RegisterEstimator>(); | ||
44 | } | ||
45 | |||
46 | +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) | ||
47 | void dumpDDGContents(); | ||
48 | void dumpPriorityQueueContents(); | ||
49 | +#endif | ||
50 | |||
51 | void clearDDG(); | ||
52 | |||
53 | @@ -228,6 +230,7 @@ IGC_INITIALIZE_PASS_DEPENDENCY(RegisterEstimator) | ||
54 | IGC_INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass) | ||
55 | IGC_INITIALIZE_PASS_END(PreRAScheduler, PASS_FLAG, PASS_DESC, PASS_CFG_ONLY, PASS_ANALYSIS) | ||
56 | |||
57 | +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) | ||
58 | void PreRAScheduler::dumpDDGContents() | ||
59 | { | ||
60 | IGC_SET_FLAG_VALUE(PrintToConsole, 1); | ||
61 | @@ -259,6 +262,7 @@ void PreRAScheduler::dumpDDGContents() | ||
62 | |||
63 | IGC_SET_FLAG_VALUE(PrintToConsole, 0); | ||
64 | } | ||
65 | +#endif | ||
66 | |||
67 | void PreRAScheduler::clearDDG() | ||
68 | { | ||
69 | @@ -841,6 +845,7 @@ bool PreRAScheduler::ScheduleReadyNodes( | ||
70 | return Changed; | ||
71 | } | ||
72 | |||
73 | +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) | ||
74 | void PreRAScheduler::dumpPriorityQueueContents() | ||
75 | { | ||
76 | llvm::PriorityQueue<Node*, std::vector<Node*>, PreRAScheduler::OrderByLatency> longLatencyQueueCopy = longLatencyDelaySortedReadyQueue; | ||
77 | @@ -912,6 +917,7 @@ void PreRAScheduler::dumpPriorityQueueContents() | ||
78 | |||
79 | IGC_SET_FLAG_VALUE(PrintToConsole, 0); | ||
80 | } | ||
81 | +#endif | ||
82 | |||
83 | bool PreRAScheduler::runOnFunction(Function& F) { | ||
84 | CodeGenContext* ctx = getAnalysis<CodeGenContextWrapper>().getCodeGenContext(); | ||
85 | -- | ||
86 | 2.17.1 | ||
87 | |||
diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/files/0003-Fix-for-buildbreak-when-using-clang-9-compiler.patch b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0003-Fix-for-buildbreak-when-using-clang-9-compiler.patch deleted file mode 100644 index 4af8c17e..00000000 --- a/dynamic-layers/clang-layer/recipes-opencl/igc/files/0003-Fix-for-buildbreak-when-using-clang-9-compiler.patch +++ /dev/null | |||
@@ -1,405 +0,0 @@ | |||
1 | From 598038626dd2c10b96308347718f26cfa3dc509c Mon Sep 17 00:00:00 2001 | ||
2 | From: "Wesierski, Lukasz" <lukasz.wesierski@intel.com> | ||
3 | Date: Mon, 9 Sep 2019 09:11:20 -0700 | ||
4 | Subject: [PATCH 4/4] Fix for buildbreak when using clang-9 compiler | ||
5 | |||
6 | Fixes #106 | ||
7 | Fxies #111 | ||
8 | |||
9 | Change-Id: I291bf03c31b1786a00b8bc2c6d23c5adb8b72e73 | ||
10 | |||
11 | Upstream-Status: Backport [https://github.com/intel/intel-graphics-compiler/commit/a332238b46e9fa9e06265d18eb877d095015e6fb] | ||
12 | |||
13 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
14 | --- | ||
15 | IGC/AdaptorOCL/SPIRV/libSPIRV/SPIRVEntry.h | 4 + | ||
16 | .../SPIRV/libSPIRV/SPIRVInstruction.h | 18 +-- | ||
17 | IGC/AdaptorOCL/SPIRV/libSPIRV/SPIRVModule.cpp | 136 +++++++++--------- | ||
18 | IGC/AdaptorOCL/cif/cif/export/registry.h | 3 +- | ||
19 | IGC/OCLFE/igd_fcl_mcl/source/clang_tb.cpp | 4 +- | ||
20 | visa/CISA.l | 2 +- | ||
21 | visa/CMakeLists.txt | 6 +- | ||
22 | 7 files changed, 89 insertions(+), 84 deletions(-) | ||
23 | |||
24 | diff --git a/IGC/AdaptorOCL/SPIRV/libSPIRV/SPIRVEntry.h b/IGC/AdaptorOCL/SPIRV/libSPIRV/SPIRVEntry.h | ||
25 | index 7a2ba855..307ba3f3 100644 | ||
26 | --- a/IGC/AdaptorOCL/SPIRV/libSPIRV/SPIRVEntry.h | ||
27 | +++ b/IGC/AdaptorOCL/SPIRV/libSPIRV/SPIRVEntry.h | ||
28 | @@ -129,8 +129,12 @@ class SPIRVExtInst; | ||
29 | void decode(std::istream &I) { getDecoder(I) >> x >> y;} | ||
30 | #define _SPIRV_DEF_DEC3(x,y,z) \ | ||
31 | void decode(std::istream &I) { getDecoder(I) >> x >> y >> z;} | ||
32 | +#define _SPIRV_DEF_DEC3_OVERRIDE(x,y,z) \ | ||
33 | + void decode(std::istream &I) override { getDecoder(I) >> x >> y >> z;} | ||
34 | #define _SPIRV_DEF_DEC4(x,y,z,u) \ | ||
35 | void decode(std::istream &I) { getDecoder(I) >> x >> y >> z >> u;} | ||
36 | +#define _SPIRV_DEF_DEC4_OVERRIDE(x,y,z,u) \ | ||
37 | + void decode(std::istream &I) override { getDecoder(I) >> x >> y >> z >> u;} | ||
38 | #define _SPIRV_DEF_DEC5(x,y,z,u,v) \ | ||
39 | void decode(std::istream &I) { getDecoder(I) >> x >> y >> z >> u >> v;} | ||
40 | #define _SPIRV_DEF_DEC6(x,y,z,u,v,w) \ | ||
41 | diff --git a/IGC/AdaptorOCL/SPIRV/libSPIRV/SPIRVInstruction.h b/IGC/AdaptorOCL/SPIRV/libSPIRV/SPIRVInstruction.h | ||
42 | index 9f4e9d1f..bb85fd04 100644 | ||
43 | --- a/IGC/AdaptorOCL/SPIRV/libSPIRV/SPIRVInstruction.h | ||
44 | +++ b/IGC/AdaptorOCL/SPIRV/libSPIRV/SPIRVInstruction.h | ||
45 | @@ -727,10 +727,10 @@ public: | ||
46 | return getValue(ConditionId); | ||
47 | } | ||
48 | SPIRVLabel *getTrueLabel() const { | ||
49 | - return get<SPIRVLabel>(TrueLabelId); | ||
50 | + return SPIRVEntry::get<SPIRVLabel>(TrueLabelId); | ||
51 | } | ||
52 | SPIRVLabel *getFalseLabel() const { | ||
53 | - return get<SPIRVLabel>(FalseLabelId); | ||
54 | + return SPIRVEntry::get<SPIRVLabel>(FalseLabelId); | ||
55 | } | ||
56 | protected: | ||
57 | void setWordCount(SPIRVWord TheWordCount) { | ||
58 | @@ -940,7 +940,7 @@ public: | ||
59 | SPIRVEntry::setWordCount(TheWordCount); | ||
60 | LoopControlParameters.resize(TheWordCount - FixedWordCount); | ||
61 | } | ||
62 | - _SPIRV_DEF_DEC4(MergeBlock, ContinueTarget, LoopControl, | ||
63 | + _SPIRV_DEF_DEC4_OVERRIDE(MergeBlock, ContinueTarget, LoopControl, | ||
64 | LoopControlParameters) | ||
65 | |||
66 | protected: | ||
67 | @@ -1120,7 +1120,7 @@ public: | ||
68 | |||
69 | SPIRVFunctionCallGeneric(SPIRVModule *BM, SPIRVWord ResId, SPIRVType *TheType, | ||
70 | const std::vector<SPIRVWord> &TheArgs) | ||
71 | - : SPIRVInstruction(TheArgs.size() + FixedWordCount, OC, TheType, ResId, | ||
72 | + : SPIRVInstruction(TheArgs.size() + FixedWordCount, OC, TheType, ResId, NULL, | ||
73 | BM), | ||
74 | Args(TheArgs) {} | ||
75 | SPIRVFunctionCallGeneric():SPIRVInstruction(OC) {} | ||
76 | @@ -1152,7 +1152,7 @@ class SPIRVFunctionCall: | ||
77 | public: | ||
78 | SPIRVFunctionCall():FunctionId(SPIRVID_INVALID) {} | ||
79 | SPIRVFunction *getFunction()const { | ||
80 | - return get<SPIRVFunction>(FunctionId); | ||
81 | + return SPIRVEntry::get<SPIRVFunction>(FunctionId); | ||
82 | } | ||
83 | _SPIRV_DEF_DEC4(Type, Id, FunctionId, Args) | ||
84 | void validate()const; | ||
85 | @@ -1169,8 +1169,8 @@ public: | ||
86 | const std::vector<SPIRVWord>& TheArgs, | ||
87 | SPIRVBasicBlock* BB); | ||
88 | SPIRVFunctionPointerCallINTEL() : CalledValueId(SPIRVID_INVALID) {} | ||
89 | - SPIRVValue* getCalledValue() const { return get<SPIRVValue>(CalledValueId); } | ||
90 | - _SPIRV_DEF_DEC4(Type, Id, CalledValueId, Args) | ||
91 | + SPIRVValue* getCalledValue() const { return SPIRVEntry::get<SPIRVValue>(CalledValueId); } | ||
92 | + _SPIRV_DEF_DEC4_OVERRIDE(Type, Id, CalledValueId, Args) | ||
93 | void validate() const override; | ||
94 | bool isOperandLiteral(unsigned Index) const { return false; } | ||
95 | CapVec getRequiredCapability() const override { | ||
96 | @@ -1188,8 +1188,8 @@ public: | ||
97 | SPIRVFunctionPointerINTEL(SPIRVId TheId, SPIRVType* TheType, | ||
98 | SPIRVFunction* TheFunction, SPIRVBasicBlock* BB); | ||
99 | SPIRVFunctionPointerINTEL() : SPIRVInstruction(OC), TheFunction(SPIRVID_INVALID) {} | ||
100 | - SPIRVFunction* getFunction() const { return get<SPIRVFunction>(TheFunction); } | ||
101 | - _SPIRV_DEF_DEC3(Type, Id, TheFunction) | ||
102 | + SPIRVFunction* getFunction() const { return SPIRVEntry::get<SPIRVFunction>(TheFunction); } | ||
103 | + _SPIRV_DEF_DEC3_OVERRIDE(Type, Id, TheFunction) | ||
104 | void validate() const override; | ||
105 | bool isOperandLiteral(unsigned Index) const { return false; } | ||
106 | CapVec getRequiredCapability() const override { | ||
107 | diff --git a/IGC/AdaptorOCL/SPIRV/libSPIRV/SPIRVModule.cpp b/IGC/AdaptorOCL/SPIRV/libSPIRV/SPIRVModule.cpp | ||
108 | index 353341b5..74ab6e93 100644 | ||
109 | --- a/IGC/AdaptorOCL/SPIRV/libSPIRV/SPIRVModule.cpp | ||
110 | +++ b/IGC/AdaptorOCL/SPIRV/libSPIRV/SPIRVModule.cpp | ||
111 | @@ -94,126 +94,126 @@ public: | ||
112 | virtual ~SPIRVModuleImpl(); | ||
113 | |||
114 | // Object query functions | ||
115 | - bool exist(SPIRVId) const; | ||
116 | - bool exist(SPIRVId, SPIRVEntry **) const; | ||
117 | + bool exist(SPIRVId) const override; | ||
118 | + bool exist(SPIRVId, SPIRVEntry **) const override; | ||
119 | SPIRVId getId(SPIRVId Id = SPIRVID_INVALID, unsigned Increment = 1); | ||
120 | - virtual SPIRVEntry *getEntry(SPIRVId Id) const; | ||
121 | + virtual SPIRVEntry *getEntry(SPIRVId Id) const override; | ||
122 | virtual void addUnknownStructField( | ||
123 | - SPIRVTypeStruct*, unsigned idx, SPIRVId id); | ||
124 | - virtual void resolveUnknownStructFields(); | ||
125 | - bool hasDebugInfo() const | ||
126 | + SPIRVTypeStruct*, unsigned idx, SPIRVId id) override; | ||
127 | + virtual void resolveUnknownStructFields() override; | ||
128 | + bool hasDebugInfo() const override | ||
129 | { | ||
130 | return getCompilationUnit() != nullptr; | ||
131 | } | ||
132 | |||
133 | // Error handling functions | ||
134 | - SPIRVErrorLog &getErrorLog() { return ErrLog;} | ||
135 | - SPIRVErrorCode getError(std::string &ErrMsg) { return ErrLog.getError(ErrMsg);} | ||
136 | + SPIRVErrorLog &getErrorLog() override { return ErrLog;} | ||
137 | + SPIRVErrorCode getError(std::string &ErrMsg) override { return ErrLog.getError(ErrMsg);} | ||
138 | |||
139 | // Module query functions | ||
140 | - SPIRVAddressingModelKind getAddressingModel() { return AddrModel;} | ||
141 | - SPIRVExtInstSetKind getBuiltinSet(SPIRVId SetId) const; | ||
142 | - const SPIRVCapSet &getCapability() const { return CapSet;} | ||
143 | - const std::string &getCompileFlag() const { return CompileFlag;} | ||
144 | - std::string &getCompileFlag() { return CompileFlag;} | ||
145 | - void setCompileFlag(const std::string &options) { CompileFlag = options; } | ||
146 | - bool isSpecConstant(SPIRVWord spec_id) const { | ||
147 | + SPIRVAddressingModelKind getAddressingModel() override { return AddrModel;} | ||
148 | + SPIRVExtInstSetKind getBuiltinSet(SPIRVId SetId) const override; | ||
149 | + const SPIRVCapSet &getCapability() const override { return CapSet;} | ||
150 | + const std::string &getCompileFlag() const override { return CompileFlag;} | ||
151 | + std::string &getCompileFlag() override { return CompileFlag;} | ||
152 | + void setCompileFlag(const std::string &options) override { CompileFlag = options; } | ||
153 | + bool isSpecConstant(SPIRVWord spec_id) const override { | ||
154 | if(SCMap) | ||
155 | return SCMap->find(spec_id) != SCMap->end(); | ||
156 | else | ||
157 | return false; | ||
158 | } | ||
159 | - uint64_t getSpecConstant(SPIRVWord spec_id) { | ||
160 | + uint64_t getSpecConstant(SPIRVWord spec_id) override { | ||
161 | spirv_assert(isSpecConstant(spec_id) && "Specialization constant was not specialized!"); | ||
162 | return SCMap->at(spec_id); | ||
163 | } | ||
164 | - void setSpecConstantMap(SPIRVSpecConstantMap *specConstants) { SCMap = specConstants; } | ||
165 | - std::set<std::string> &getExtension() { return SPIRVExt;} | ||
166 | - SPIRVFunction *getFunction(unsigned I) const { return FuncVec[I];} | ||
167 | - SPIRVVariable *getVariable(unsigned I) const { return VariableVec[I];} | ||
168 | - virtual SPIRVValue *getValue(SPIRVId TheId) const; | ||
169 | - virtual std::vector<SPIRVValue *> getValues(const std::vector<SPIRVId>&)const; | ||
170 | - virtual std::vector<SPIRVId> getIds(const std::vector<SPIRVEntry *>&)const; | ||
171 | - virtual std::vector<SPIRVId> getIds(const std::vector<SPIRVValue *>&)const; | ||
172 | - virtual SPIRVType *getValueType(SPIRVId TheId)const; | ||
173 | + void setSpecConstantMap(SPIRVSpecConstantMap *specConstants) override { SCMap = specConstants; } | ||
174 | + std::set<std::string> &getExtension() override { return SPIRVExt;} | ||
175 | + SPIRVFunction *getFunction(unsigned I) const override { return FuncVec[I];} | ||
176 | + SPIRVVariable *getVariable(unsigned I) const override { return VariableVec[I];} | ||
177 | + virtual SPIRVValue *getValue(SPIRVId TheId) const override; | ||
178 | + virtual std::vector<SPIRVValue *> getValues(const std::vector<SPIRVId>&)const override; | ||
179 | + virtual std::vector<SPIRVId> getIds(const std::vector<SPIRVEntry *>&)const override; | ||
180 | + virtual std::vector<SPIRVId> getIds(const std::vector<SPIRVValue *>&)const override; | ||
181 | + virtual SPIRVType *getValueType(SPIRVId TheId)const override; | ||
182 | virtual std::vector<SPIRVType *> getValueTypes(const std::vector<SPIRVId>&) | ||
183 | - const; | ||
184 | - SPIRVMemoryModelKind getMemoryModel() { return MemoryModel;} | ||
185 | - virtual SPIRVConstant* getLiteralAsConstant(unsigned Literal); | ||
186 | - unsigned getNumEntryPoints(SPIRVExecutionModelKind EM) const { | ||
187 | + const override; | ||
188 | + SPIRVMemoryModelKind getMemoryModel() override { return MemoryModel;} | ||
189 | + virtual SPIRVConstant* getLiteralAsConstant(unsigned Literal) override; | ||
190 | + unsigned getNumEntryPoints(SPIRVExecutionModelKind EM) const override{ | ||
191 | auto Loc = EntryPointVec.find(EM); | ||
192 | if (Loc == EntryPointVec.end()) | ||
193 | return 0; | ||
194 | return Loc->second.size(); | ||
195 | } | ||
196 | - SPIRVFunction *getEntryPoint(SPIRVExecutionModelKind EM, unsigned I) const { | ||
197 | + SPIRVFunction *getEntryPoint(SPIRVExecutionModelKind EM, unsigned I) const override { | ||
198 | auto Loc = EntryPointVec.find(EM); | ||
199 | if (Loc == EntryPointVec.end()) | ||
200 | return nullptr; | ||
201 | spirv_assert(I < Loc->second.size()); | ||
202 | return get<SPIRVFunction>(Loc->second[I]); | ||
203 | } | ||
204 | - unsigned getNumFunctions() const { return FuncVec.size();} | ||
205 | - unsigned getNumVariables() const { return VariableVec.size();} | ||
206 | - SpvSourceLanguage getSourceLanguage(SPIRVWord * Ver = nullptr) const { | ||
207 | + unsigned getNumFunctions() const override { return FuncVec.size();} | ||
208 | + unsigned getNumVariables() const override { return VariableVec.size();} | ||
209 | + SpvSourceLanguage getSourceLanguage(SPIRVWord * Ver = nullptr) const override { | ||
210 | if (Ver) | ||
211 | *Ver = SrcLangVer; | ||
212 | return SrcLang; | ||
213 | } | ||
214 | - std::set<std::string> &getSourceExtension() { return SrcExtension;} | ||
215 | - bool isEntryPoint(SPIRVExecutionModelKind, SPIRVId EP) const; | ||
216 | + std::set<std::string> &getSourceExtension() override { return SrcExtension;} | ||
217 | + bool isEntryPoint(SPIRVExecutionModelKind, SPIRVId EP) const override; | ||
218 | const std::string &getModuleProcessed() const { return ModuleProcessed; } | ||
219 | - const std::vector<SPIRVString *> &getStringVec() const { return StringVec; } | ||
220 | + const std::vector<SPIRVString *> &getStringVec() const override { return StringVec; } | ||
221 | |||
222 | // Module changing functions | ||
223 | - bool importBuiltinSet(const std::string &, SPIRVId *); | ||
224 | - bool importBuiltinSetWithId(const std::string &, SPIRVId); | ||
225 | - void optimizeDecorates(); | ||
226 | - void setAddressingModel(SPIRVAddressingModelKind AM) { AddrModel = AM;} | ||
227 | - void setAlignment(SPIRVValue *, SPIRVWord); | ||
228 | - void setMemoryModel(SPIRVMemoryModelKind MM) { MemoryModel = MM;} | ||
229 | - void setName(SPIRVEntry *E, const std::string &Name); | ||
230 | - void setSourceLanguage(SpvSourceLanguage Lang, SPIRVWord Ver) { | ||
231 | + bool importBuiltinSet(const std::string &, SPIRVId *) override; | ||
232 | + bool importBuiltinSetWithId(const std::string &, SPIRVId) override; | ||
233 | + void optimizeDecorates() override; | ||
234 | + void setAddressingModel(SPIRVAddressingModelKind AM) override { AddrModel = AM;} | ||
235 | + void setAlignment(SPIRVValue *, SPIRVWord) override; | ||
236 | + void setMemoryModel(SPIRVMemoryModelKind MM) override { MemoryModel = MM;} | ||
237 | + void setName(SPIRVEntry *E, const std::string &Name) override; | ||
238 | + void setSourceLanguage(SpvSourceLanguage Lang, SPIRVWord Ver) override { | ||
239 | SrcLang = Lang; | ||
240 | SrcLangVer = Ver; | ||
241 | } | ||
242 | - void setModuleProcessed(const std::string& MP) { | ||
243 | + void setModuleProcessed(const std::string& MP) override { | ||
244 | ModuleProcessed = MP; | ||
245 | } | ||
246 | |||
247 | // Object creation functions | ||
248 | template<class T> void addTo(std::vector<T *> &V, SPIRVEntry *E); | ||
249 | - virtual SPIRVEntry *addEntry(SPIRVEntry *E); | ||
250 | - virtual SPIRVString *getString(const std::string &Str); | ||
251 | + virtual SPIRVEntry *addEntry(SPIRVEntry *E) override; | ||
252 | + virtual SPIRVString *getString(const std::string &Str) override; | ||
253 | virtual SPIRVMemberName *addMemberName(SPIRVTypeStruct *ST, | ||
254 | - SPIRVWord MemberNumber, const std::string &Name); | ||
255 | + SPIRVWord MemberNumber, const std::string &Name) override; | ||
256 | virtual SPIRVLine *addLine(SPIRVString *FileName, SPIRVWord Line, | ||
257 | - SPIRVWord Column); | ||
258 | - virtual void addCapability(SPIRVCapabilityKind); | ||
259 | - virtual const SPIRVDecorateGeneric *addDecorate(const SPIRVDecorateGeneric *); | ||
260 | - virtual SPIRVDecorationGroup *addDecorationGroup(); | ||
261 | - virtual SPIRVDecorationGroup *addDecorationGroup(SPIRVDecorationGroup *Group); | ||
262 | + SPIRVWord Column) override; | ||
263 | + virtual void addCapability(SPIRVCapabilityKind) override; | ||
264 | + virtual const SPIRVDecorateGeneric *addDecorate(const SPIRVDecorateGeneric *) override; | ||
265 | + virtual SPIRVDecorationGroup *addDecorationGroup() override; | ||
266 | + virtual SPIRVDecorationGroup *addDecorationGroup(SPIRVDecorationGroup *Group) override; | ||
267 | virtual SPIRVGroupDecorate *addGroupDecorate(SPIRVDecorationGroup *Group, | ||
268 | - const std::vector<SPIRVEntry *> &Targets); | ||
269 | + const std::vector<SPIRVEntry *> &Targets) override; | ||
270 | virtual SPIRVGroupDecorateGeneric *addGroupDecorateGeneric( | ||
271 | - SPIRVGroupDecorateGeneric *GDec); | ||
272 | + SPIRVGroupDecorateGeneric *GDec) override; | ||
273 | virtual SPIRVGroupMemberDecorate *addGroupMemberDecorate( | ||
274 | - SPIRVDecorationGroup *Group, const std::vector<SPIRVEntry *> &Targets); | ||
275 | + SPIRVDecorationGroup *Group, const std::vector<SPIRVEntry *> &Targets) override; | ||
276 | virtual void addEntryPoint(SPIRVExecutionModelKind ExecModel, | ||
277 | - SPIRVId EntryPoint); | ||
278 | - virtual SPIRVForward *addForward(SPIRVType *Ty); | ||
279 | - virtual SPIRVForward *addForward(SPIRVId, SPIRVType *Ty); | ||
280 | - virtual SPIRVFunction *addFunction(SPIRVFunction *); | ||
281 | - virtual SPIRVFunction *addFunction(SPIRVTypeFunction *, SPIRVId); | ||
282 | - virtual SPIRVEntry *replaceForward(SPIRVForward *, SPIRVEntry *); | ||
283 | + SPIRVId EntryPoint) override; | ||
284 | + virtual SPIRVForward *addForward(SPIRVType *Ty) override; | ||
285 | + virtual SPIRVForward *addForward(SPIRVId, SPIRVType *Ty) override; | ||
286 | + virtual SPIRVFunction *addFunction(SPIRVFunction *) override; | ||
287 | + virtual SPIRVFunction *addFunction(SPIRVTypeFunction *, SPIRVId) override; | ||
288 | + virtual SPIRVEntry *replaceForward(SPIRVForward *, SPIRVEntry *) override; | ||
289 | |||
290 | // Type creation functions | ||
291 | template<class T> T * addType(T *Ty); | ||
292 | - virtual SPIRVTypeInt *addIntegerType(unsigned BitWidth); | ||
293 | + virtual SPIRVTypeInt *addIntegerType(unsigned BitWidth) override; | ||
294 | |||
295 | // Constant creation functions | ||
296 | - virtual SPIRVValue *addConstant(SPIRVValue *); | ||
297 | - virtual SPIRVValue *addConstant(SPIRVType *, uint64_t); | ||
298 | + virtual SPIRVValue *addConstant(SPIRVValue *) override; | ||
299 | + virtual SPIRVValue *addConstant(SPIRVType *, uint64_t) override; | ||
300 | |||
301 | virtual SPIRVInstruction *addLoopMergeInst( | ||
302 | SPIRVId MergeBlock, SPIRVId ContinueTarget, | ||
303 | @@ -226,7 +226,7 @@ public: | ||
304 | addInstruction(SPIRVInstruction *Inst, SPIRVBasicBlock *BB, | ||
305 | SPIRVInstruction *InsertBefore = nullptr); | ||
306 | |||
307 | - virtual SPIRVExtInst* getCompilationUnit() const | ||
308 | + virtual SPIRVExtInst* getCompilationUnit() const override | ||
309 | { | ||
310 | for (auto& item : IdEntryMap) | ||
311 | { | ||
312 | @@ -242,7 +242,7 @@ public: | ||
313 | return nullptr; | ||
314 | } | ||
315 | |||
316 | - virtual std::vector<SPIRVExtInst*> getGlobalVars() | ||
317 | + virtual std::vector<SPIRVExtInst*> getGlobalVars() override | ||
318 | { | ||
319 | std::vector<SPIRVExtInst*> globalVars; | ||
320 | |||
321 | @@ -260,7 +260,7 @@ public: | ||
322 | return globalVars; | ||
323 | } | ||
324 | |||
325 | - virtual std::vector<SPIRVValue*> parseSpecConstants() | ||
326 | + virtual std::vector<SPIRVValue*> parseSpecConstants() override | ||
327 | { | ||
328 | std::vector<SPIRVValue*> specConstants; | ||
329 | |||
330 | diff --git a/IGC/AdaptorOCL/cif/cif/export/registry.h b/IGC/AdaptorOCL/cif/cif/export/registry.h | ||
331 | index a2b893c2..1571a698 100644 | ||
332 | --- a/IGC/AdaptorOCL/cif/cif/export/registry.h | ||
333 | +++ b/IGC/AdaptorOCL/cif/cif/export/registry.h | ||
334 | @@ -50,7 +50,8 @@ namespace Helpers { | ||
335 | struct EntryPointInterfaceBase{ | ||
336 | EntryPointInterfaceBase(){ | ||
337 | } | ||
338 | - | ||
339 | + virtual ~EntryPointInterfaceBase() = default; | ||
340 | + | ||
341 | virtual ICIF * Create(Version_t version, ICIF * parent) const = 0; | ||
342 | virtual InterfaceId_t GetFirstIncompatible(CIF::CompatibilityDataHandle handle) const = 0; | ||
343 | virtual void GetSupportedVersions(Version_t &verMin, Version_t &verMax) const = 0; | ||
344 | diff --git a/IGC/OCLFE/igd_fcl_mcl/source/clang_tb.cpp b/IGC/OCLFE/igd_fcl_mcl/source/clang_tb.cpp | ||
345 | index ebad9b3d..3bde1151 100644 | ||
346 | --- a/IGC/OCLFE/igd_fcl_mcl/source/clang_tb.cpp | ||
347 | +++ b/IGC/OCLFE/igd_fcl_mcl/source/clang_tb.cpp | ||
348 | @@ -301,7 +301,7 @@ namespace FCL | ||
349 | std::string dumpPath = "c:\\Intel\\IGC\\"; // default if something goes wrong | ||
350 | char custom_dir[256]; | ||
351 | FCLReadIGCRegistry("DumpToCustomDir", custom_dir, sizeof(custom_dir)); | ||
352 | - if (custom_dir != nullptr && strlen(custom_dir) > 0) | ||
353 | + if (strlen(custom_dir) > 0) | ||
354 | { | ||
355 | dumpPath = custom_dir; | ||
356 | } | ||
357 | @@ -321,7 +321,7 @@ namespace FCL | ||
358 | std::string dumpPath = "/tmp/IntelIGC/"; // default if something goes wrong | ||
359 | char custom_dir[256]; | ||
360 | FCLReadIGCRegistry("DumpToCustomDir", custom_dir, sizeof(custom_dir)); | ||
361 | - if (custom_dir != nullptr && strlen(custom_dir) > 0) | ||
362 | + if (strlen(custom_dir) > 0) | ||
363 | { | ||
364 | dumpPath = custom_dir; | ||
365 | } | ||
366 | diff --git a/visa/CISA.l b/visa/CISA.l | ||
367 | index def21e4b..27532695 100644 | ||
368 | --- a/visa/CISA.l | ||
369 | +++ b/visa/CISA.l | ||
370 | @@ -45,7 +45,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
371 | #pragma warning(default: 4005) | ||
372 | #endif | ||
373 | |||
374 | -#include "CISA.tab.h" | ||
375 | +#include "CISA.tab.hpp" | ||
376 | |||
377 | #ifdef _DEBUG | ||
378 | #define TRACE(str) fprintf(yyout, str); ECHO; fprintf(yyout, "\n") | ||
379 | diff --git a/visa/CMakeLists.txt b/visa/CMakeLists.txt | ||
380 | index 11d1bf53..551e4edb 100644 | ||
381 | --- a/visa/CMakeLists.txt | ||
382 | +++ b/visa/CMakeLists.txt | ||
383 | @@ -105,8 +105,8 @@ endif() | ||
384 | # Set up the bison and flex targets. These commands will set up commands to generate the appropriate | ||
385 | # source files from the input grammars. It will also set up the dependencies correctly for any | ||
386 | # library or executable that uses the generated source | ||
387 | -BISON_TARGET(CISAParser CISA.y ${CMAKE_CURRENT_BINARY_DIR}/CISA.tab.c COMPILE_FLAGS "-vt -p CISA") | ||
388 | -FLEX_TARGET(CISAScanner CISA.l ${CMAKE_CURRENT_BINARY_DIR}/lex.CISA.c COMPILE_FLAGS "-PCISA ${WIN_FLEX_FLAG}") | ||
389 | +BISON_TARGET(CISAParser CISA.y ${CMAKE_CURRENT_BINARY_DIR}/CISA.tab.cpp COMPILE_FLAGS "-vt -p CISA") | ||
390 | +FLEX_TARGET(CISAScanner CISA.l ${CMAKE_CURRENT_BINARY_DIR}/lex.CISA.cpp COMPILE_FLAGS "-PCISA ${WIN_FLEX_FLAG}") | ||
391 | ADD_FLEX_BISON_DEPENDENCY(CISAScanner CISAParser) | ||
392 | |||
393 | add_custom_target(CISAScanner_target DEPENDS ${FLEX_CISAScanner_OUTPUTS} ${BISON_CISAParser_OUTPUTS}) | ||
394 | @@ -134,7 +134,7 @@ include_directories(${Jitter_inc_dirs}) | ||
395 | |||
396 | # Tell cmake to generate code to compile the flex and bison generated source as c++ rather than c | ||
397 | # (due to the fact that they are .c files rather than .cpp) | ||
398 | -set_source_files_properties( CISA.tab.c lex.CISA.c PROPERTIES LANGUAGE CXX ) | ||
399 | +set_source_files_properties( CISA.tab.cpp lex.CISA.cpp PROPERTIES LANGUAGE CXX ) | ||
400 | |||
401 | set(LocalScheduler_SOURCES | ||
402 | LocalScheduler/Dependencies_G4IR.cpp | ||
403 | -- | ||
404 | 2.17.1 | ||
405 | |||
diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/files/0003-Improve-Reproducibility-for-src-package.patch b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0003-Improve-Reproducibility-for-src-package.patch new file mode 100644 index 00000000..650130a8 --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0003-Improve-Reproducibility-for-src-package.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | From 0559332abd04b6c8bc70171d201f43d2e4735336 Mon Sep 17 00:00:00 2001 | ||
2 | From: Lee Chee Yang <chee.yang.lee@intel.com> | ||
3 | Date: Wed, 2 Sep 2020 08:28:35 +0800 | ||
4 | Subject: [PATCH] Improve Reproducibility for src package | ||
5 | |||
6 | Improve reproducibility for intel-graphics-compiler-src package. | ||
7 | needs to pass build path as environment variable to the build. | ||
8 | this only works on bison 3.7 onward, hence check for bison version | ||
9 | before adding the flags. | ||
10 | Upstream-Status: Inappropriate [applying --file-prefix-map in such way does not work for upstream] | ||
11 | Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> | ||
12 | |||
13 | --- | ||
14 | visa/CMakeLists.txt | 7 +++++-- | ||
15 | 1 file changed, 5 insertions(+), 2 deletions(-) | ||
16 | |||
17 | diff --git a/visa/CMakeLists.txt b/visa/CMakeLists.txt | ||
18 | index 6be467587..930c386a6 100644 | ||
19 | --- a/visa/CMakeLists.txt | ||
20 | +++ b/visa/CMakeLists.txt | ||
21 | @@ -123,8 +123,11 @@ endif() | ||
22 | set(bison_output_file ${CMAKE_CURRENT_BINARY_DIR}/CISA.tab.cpp) | ||
23 | set(flex_output_file ${CMAKE_CURRENT_BINARY_DIR}/lex.CISA.cpp) | ||
24 | |||
25 | -BISON_TARGET(CISAParser CISA.y ${bison_output_file} COMPILE_FLAGS "-vt -p CISA") | ||
26 | -FLEX_TARGET(CISAScanner CISA.l ${flex_output_file} COMPILE_FLAGS "-PCISA ${WIN_FLEX_FLAG}") | ||
27 | +if(BISON_VERSION VERSION_GREATER_EQUAL "3.7.0") | ||
28 | + set(BISON_EXTRA_FLAGS " --file-prefix-map=$ENV{B}=/igc/ ") | ||
29 | +endif() | ||
30 | +BISON_TARGET(CISAParser CISA.y ${bison_output_file} COMPILE_FLAGS "-l -vt -p CISA ${BISON_EXTRA_FLAGS} ") | ||
31 | +FLEX_TARGET(CISAScanner CISA.l ${flex_output_file} COMPILE_FLAGS "-PCISA -L ${WIN_FLEX_FLAG} ") | ||
32 | ADD_FLEX_BISON_DEPENDENCY(CISAScanner CISAParser) | ||
33 | set(CISAScanner_dependencies) | ||
34 | |||
diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.11.bb b/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.11.bb deleted file mode 100644 index b359b669..00000000 --- a/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.11.bb +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | SUMMARY = "The Intel(R) Graphics Compiler for OpenCL(TM)" | ||
2 | DESCRIPTION = "The Intel(R) Graphics Compiler for OpenCL(TM) is an \ | ||
3 | llvm based compiler for OpenCL(TM) targeting Intel Gen graphics \ | ||
4 | hardware architecture." | ||
5 | |||
6 | LICENSE = "MIT & BSD-3-Clause" | ||
7 | LIC_FILES_CHKSUM = "file://IGC/BiFModule/Implementation/ExternalLibraries/libclc/LICENSE.TXT;md5=311cfc1a5b54bab8ed34a0b5fba4373e \ | ||
8 | file://IGC/Compiler/LegalizationPass.cpp;beginline=1;endline=25;md5=4abf1738ff96b18e34186eb763e28eeb" | ||
9 | |||
10 | SRC_URI = "git://github.com/intel/intel-graphics-compiler.git;protocol=https \ | ||
11 | file://0001-skip-execution-of-ElfPackager.patch \ | ||
12 | file://0002-comment-out-dump-functions.patch \ | ||
13 | file://0003-Fix-for-buildbreak-when-using-clang-9-compiler.patch \ | ||
14 | " | ||
15 | |||
16 | SRCREV = "5f96c6db35ffa238fd84314c99a53e6708322d65" | ||
17 | |||
18 | S = "${WORKDIR}/git" | ||
19 | |||
20 | inherit cmake | ||
21 | |||
22 | COMPATIBLE_HOST = '(x86_64).*-linux' | ||
23 | COMPATIBLE_HOST_libc-musl = "null" | ||
24 | |||
25 | DEPENDS += " flex-native bison-native clang opencl-clang" | ||
26 | DEPENDS_append_class-target = " clang-cross-x86_64" | ||
27 | |||
28 | RDEPENDS_${PN} += "opencl-clang" | ||
29 | |||
30 | EXTRA_OECMAKE = "-DIGC_PREFERRED_LLVM_VERSION=9.0.0 -DPYTHON_EXECUTABLE=${HOSTTOOLS_DIR}/python3" | ||
31 | |||
32 | LDFLAGS_append_class-native = " -fuse-ld=lld" | ||
33 | TOOLCHAIN_class-native = "clang" | ||
34 | |||
35 | BBCLASSEXTEND = "native nativesdk" | ||
36 | |||
37 | UPSTREAM_CHECK_GITTAGREGEX = "^igc-(?P<pver>(?!19\..*)\d+(\.\d+)+)$" | ||
diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.16510.2.bb b/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.16510.2.bb new file mode 100644 index 00000000..24eb97bd --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.16510.2.bb | |||
@@ -0,0 +1,75 @@ | |||
1 | SUMMARY = "The Intel(R) Graphics Compiler for OpenCL(TM)" | ||
2 | DESCRIPTION = "The Intel(R) Graphics Compiler for OpenCL(TM) is an \ | ||
3 | llvm based compiler for OpenCL(TM) targeting Intel Gen graphics \ | ||
4 | hardware architecture." | ||
5 | |||
6 | LICENSE = "MIT & Apache-2.0" | ||
7 | LIC_FILES_CHKSUM = "file://IGC/BiFModule/Implementation/ExternalLibraries/libclc/LICENSE.TXT;md5=311cfc1a5b54bab8ed34a0b5fba4373e \ | ||
8 | file://LICENSE.md;md5=488d74376edf2765f6e78d271543dde3 \ | ||
9 | file://NOTICES.txt;md5=b81a52411c84df3419f20bad4d755880" | ||
10 | |||
11 | SRC_URI = "git://github.com/intel/intel-graphics-compiler.git;protocol=https;name=igc;branch=releases/igc-1.0.16510 \ | ||
12 | git://github.com/intel/vc-intrinsics.git;protocol=https;destsuffix=git/vc-intrinsics;name=vc;nobranch=1 \ | ||
13 | git://github.com/KhronosGroup/SPIRV-Tools.git;protocol=https;destsuffix=git/SPIRV-Tools;name=spirv-tools;branch=main \ | ||
14 | git://github.com/KhronosGroup/SPIRV-Headers.git;protocol=https;destsuffix=git/SPIRV-Headers;name=spirv-headers;branch=main \ | ||
15 | file://0003-Improve-Reproducibility-for-src-package.patch \ | ||
16 | file://0001-BiF-CMakeLists.txt-remove-opt-from-DEPENDS.patch \ | ||
17 | file://0001-external-SPIRV-Tools-change-path-to-tools-and-header.patch \ | ||
18 | " | ||
19 | |||
20 | SRC_URI:append:class-native = " file://0001-fix-tblgen.patch" | ||
21 | |||
22 | SRCREV_igc = "c2495d45f37fadd963ad22eb0cc1a8235a306775" | ||
23 | SRCREV_vc = "f9c34404d0ea9abad83875a10bd48d88cea90ebd" | ||
24 | SRCREV_spirv-tools = "f0cc85efdbbe3a46eae90e0f915dc1509836d0fc" | ||
25 | SRCREV_spirv-headers = "1c6bb2743599e6eb6f37b2969acc0aef812e32e3" | ||
26 | |||
27 | SRCREV_FORMAT = "igc_vc_spirv-tools_spirv-headers" | ||
28 | |||
29 | # Used to replace with relative path in reproducibility patch | ||
30 | export B | ||
31 | |||
32 | S = "${WORKDIR}/git" | ||
33 | |||
34 | inherit cmake pkgconfig qemu python3native | ||
35 | |||
36 | CXXFLAGS:append = " -Wno-error=nonnull" | ||
37 | |||
38 | COMPATIBLE_HOST = '(x86_64).*-linux' | ||
39 | COMPATIBLE_HOST:libc-musl = "null" | ||
40 | |||
41 | DEPENDS += " flex-native bison-native clang clang-cross-x86_64 opencl-clang qemu-native python3-mako-native" | ||
42 | |||
43 | RDEPENDS:${PN} += "opencl-clang" | ||
44 | |||
45 | PACKAGECONFIG ??= "vc" | ||
46 | PACKAGECONFIG[vc] = "-DIGC_BUILD__VC_ENABLED=ON -DIGC_OPTION__LINK_KHRONOS_SPIRV_TRANSLATOR=ON -DIGC_OPTION__SPIRV_TRANSLATOR_MODE=Prebuilds,-DIGC_BUILD__VC_ENABLED=OFF," | ||
47 | |||
48 | EXTRA_OECMAKE = " \ | ||
49 | -DIGC_OPTION__LLVM_PREFERRED_VERSION=${LLVMVERSION} \ | ||
50 | -DVC_INTRINSICS_SRC="${S}/vc-intrinsics" \ | ||
51 | -DIGC_OPTION__LLVM_MODE=Prebuilds \ | ||
52 | -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen \ | ||
53 | -DLLVM_LINK_EXE=${STAGING_BINDIR_NATIVE}/llvm-link \ | ||
54 | -DCLANG_EXE=${STAGING_BINDIR_NATIVE}/clang \ | ||
55 | -DCMAKE_CROSSCOMPILING_EMULATOR=${WORKDIR}/qemuwrapper \ | ||
56 | " | ||
57 | |||
58 | do_configure:prepend:class-target () { | ||
59 | # Write out a qemu wrapper that will be used by cmake. | ||
60 | qemu_binary="${@qemu_wrapper_cmdline(d, d.getVar('STAGING_DIR_HOST'), [d.expand('${STAGING_DIR_HOST}${libdir}'),d.expand('${STAGING_DIR_HOST}${base_libdir}')])}" | ||
61 | cat > ${WORKDIR}/qemuwrapper << EOF | ||
62 | #!/bin/sh | ||
63 | $qemu_binary "\$@" | ||
64 | EOF | ||
65 | chmod +x ${WORKDIR}/qemuwrapper | ||
66 | } | ||
67 | |||
68 | UPSTREAM_CHECK_GITTAGREGEX = "^igc-(?P<pver>(?!19\..*)\d+(\.\d+)+)$" | ||
69 | |||
70 | FILES:${PN} += " \ | ||
71 | ${libdir}/igc/NOTICES.txt \ | ||
72 | " | ||
73 | |||
74 | # libigc.so contains buildpaths | ||
75 | INSANE_SKIP:${PN} += "buildpaths" | ||