diff options
author | Naveen Saini <naveen.kumar.saini@intel.com> | 2021-03-26 18:39:15 +0800 |
---|---|---|
committer | Anuj Mittal <anuj.mittal@intel.com> | 2021-04-01 13:30:35 +0800 |
commit | a766df8081f6ffaae9a0d028f99ff3faa1313aec (patch) | |
tree | 0827d2ec042112a355e28eaf32b4e61528374900 /dynamic-layers/clang-layer/recipes-opencl/igc/files/0003-Review-fixes-for-LLVM-12-phase-2.patch | |
parent | 39457fee8ec61a0c0be02f964f89b2775a6a5d28 (diff) | |
download | meta-intel-a766df8081f6ffaae9a0d028f99ff3faa1313aec.tar.gz |
intel-graphics-compiler: upgrade 1.0.6083 -> 1.0.6410
Patches applied from Open PR#171, in order to build with llvm-12.
https://github.com/intel/intel-graphics-compiler/pull/171
Error logs:
(1)
|
/build/tmp/work/corei7-64-poky-linux/intel-graphics-compiler/1.0.6410-r0/git/IGC/Compiler/CISACodeGen/VariableReuseAnalysis.hpp:83:56:
error: 'unsigned int llvm::VectorType::getNumElements() const' is
deprecated: Calling this function via a base VectorType is deprecated.
Either call getElementCount() and handle the case where Scalable is true
or cast to FixedVectorType. [-Werror=deprecated-declarations]
| 83 | NumElts = VTy ? (short)VTy->getNumElements() : 1;
Ref:https://github.com/llvm/llvm-project/commit/867de151a52b6d0750485ac1cf9b3bc012ee51fd
(2)
|
/build/tmp/work/corei7-64-poky-linux/intel-graphics-compiler/1.0.6410-r0/git/IGC/common/igc_resourceDimTypes.h:69:23:
error: 'const class llvm::Module' has no member named 'getTypeByName'
| 69 | return
module.getTypeByName(ResourceDimensionTypeName[resourceDimTypeId]);
Ref:
https://github.com/llvm/llvm-project/commit/fe431683484a3041e024ab2373bb707b1ca8d1cf
Update copyright year in headers in IGC Compiler and some format updates.
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Diffstat (limited to 'dynamic-layers/clang-layer/recipes-opencl/igc/files/0003-Review-fixes-for-LLVM-12-phase-2.patch')
-rw-r--r-- | dynamic-layers/clang-layer/recipes-opencl/igc/files/0003-Review-fixes-for-LLVM-12-phase-2.patch | 123 |
1 files changed, 123 insertions, 0 deletions
diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/files/0003-Review-fixes-for-LLVM-12-phase-2.patch b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0003-Review-fixes-for-LLVM-12-phase-2.patch new file mode 100644 index 00000000..189c2b3f --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0003-Review-fixes-for-LLVM-12-phase-2.patch | |||
@@ -0,0 +1,123 @@ | |||
1 | From c6d333637537263930acb1b6c5dadb0467d745f6 Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?= <zboszor@pr.hu> | ||
3 | Date: Fri, 26 Feb 2021 06:39:35 +0100 | ||
4 | Subject: [PATCH 3/3] Review fixes for LLVM 12 phase 2 | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | |||
11 | Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com> | ||
12 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
13 | --- | ||
14 | IGC/AdaptorOCL/SPIRV/SPIRVReader.cpp | 4 ---- | ||
15 | .../AddressSpaceAliasAnalysis.cpp | 10 +++++----- | ||
16 | .../PrivateMemory/PrivateMemoryResolution.cpp | 4 ---- | ||
17 | IGC/DebugInfo/DebugInfoUtils.hpp | 4 ---- | ||
18 | IGC/DebugInfo/DwarfDebug.cpp | 8 -------- | ||
19 | 5 files changed, 5 insertions(+), 25 deletions(-) | ||
20 | |||
21 | diff --git a/IGC/AdaptorOCL/SPIRV/SPIRVReader.cpp b/IGC/AdaptorOCL/SPIRV/SPIRVReader.cpp | ||
22 | index 12f42be8..c4f9d1ea 100644 | ||
23 | --- a/IGC/AdaptorOCL/SPIRV/SPIRVReader.cpp | ||
24 | +++ b/IGC/AdaptorOCL/SPIRV/SPIRVReader.cpp | ||
25 | @@ -1576,11 +1576,7 @@ void SPIRVToLLVMDbgTran::transDbgInfo(SPIRVValue *SV, Value *V) { | ||
26 | Line->getColumn(), scope, iat); | ||
27 | |||
28 | if(scope && !isa<DIFile>(scope)) | ||
29 | -#if LLVM_VERSION_MAJOR >= 12 | ||
30 | I->setDebugLoc(DILocation::get(scope->getContext(), Line->getLine(), Line->getColumn(), | ||
31 | -#else | ||
32 | - I->setDebugLoc(DebugLoc::get(Line->getLine(), Line->getColumn(), | ||
33 | -#endif | ||
34 | scope, iat)); | ||
35 | } | ||
36 | } | ||
37 | diff --git a/IGC/Compiler/Optimizer/OpenCLPasses/AddressSpaceAliasAnalysis/AddressSpaceAliasAnalysis.cpp b/IGC/Compiler/Optimizer/OpenCLPasses/AddressSpaceAliasAnalysis/AddressSpaceAliasAnalysis.cpp | ||
38 | index e9c07b34..b6b779da 100644 | ||
39 | --- a/IGC/Compiler/Optimizer/OpenCLPasses/AddressSpaceAliasAnalysis/AddressSpaceAliasAnalysis.cpp | ||
40 | +++ b/IGC/Compiler/Optimizer/OpenCLPasses/AddressSpaceAliasAnalysis/AddressSpaceAliasAnalysis.cpp | ||
41 | @@ -23,8 +23,7 @@ IN THE SOFTWARE. | ||
42 | ============================= end_copyright_notice ===========================*/ | ||
43 | |||
44 | #include "llvm/Config/llvm-config.h" | ||
45 | -#include "llvmWrapper/IR/DerivedTypes.h" | ||
46 | -#include "llvmWrapper/Analysis/TargetLibraryInfo.h" | ||
47 | +#include <llvm/Analysis/TargetLibraryInfo.h> | ||
48 | #include "Compiler/Optimizer/OpenCLPasses/AddressSpaceAliasAnalysis/AddressSpaceAliasAnalysis.h" | ||
49 | #include "Compiler/CodeGenPublic.h" | ||
50 | #include "Compiler/IGCPassSupport.h" | ||
51 | @@ -180,11 +179,12 @@ namespace { | ||
52 | bool doInitialization(Module& M) override { | ||
53 | if(M.size() > 0) | ||
54 | { | ||
55 | + Result.reset(new AddressSpaceAAResult( | ||
56 | + getAnalysis<TargetLibraryInfoWrapperPass>().getTLI( | ||
57 | #if LLVM_VERSION_MAJOR >= 10 | ||
58 | - Function &F = *M.begin(); | ||
59 | + *M.begin() | ||
60 | #endif | ||
61 | - Result.reset(new AddressSpaceAAResult( | ||
62 | - getAnalysis<TargetLibraryInfoWrapperPass>().getTLI(), | ||
63 | + ), | ||
64 | *getAnalysis<CodeGenContextWrapper>().getCodeGenContext())); | ||
65 | } | ||
66 | return false; | ||
67 | diff --git a/IGC/Compiler/Optimizer/OpenCLPasses/PrivateMemory/PrivateMemoryResolution.cpp b/IGC/Compiler/Optimizer/OpenCLPasses/PrivateMemory/PrivateMemoryResolution.cpp | ||
68 | index 07f85f4c..98ea616f 100644 | ||
69 | --- a/IGC/Compiler/Optimizer/OpenCLPasses/PrivateMemory/PrivateMemoryResolution.cpp | ||
70 | +++ b/IGC/Compiler/Optimizer/OpenCLPasses/PrivateMemory/PrivateMemoryResolution.cpp | ||
71 | @@ -816,11 +816,7 @@ bool PrivateMemoryResolution::resolveAllocaInstructions(bool privateOnStack) | ||
72 | // Construct an empty DebugLoc. | ||
73 | IF_DEBUG_INFO(DebugLoc entryDebugLoc); | ||
74 | // Assign with the function location if available. | ||
75 | -#if LLVM_VERSION_MAJOR >= 12 | ||
76 | IF_DEBUG_INFO_IF(DISubprogram *subprogram = m_currFunction->getSubprogram(), entryDebugLoc = DILocation::get(subprogram->getContext(), subprogram->getLine(), 0, subprogram);); | ||
77 | -#else | ||
78 | - IF_DEBUG_INFO_IF(DISubprogram *subprogram = m_currFunction->getSubprogram(), entryDebugLoc = DebugLoc::get(subprogram->getLine(), 0, subprogram);); | ||
79 | -#endif | ||
80 | IF_DEBUG_INFO(entryBuilder.SetCurrentDebugLocation(entryDebugLoc)); | ||
81 | |||
82 | if (privateOnStack) | ||
83 | diff --git a/IGC/DebugInfo/DebugInfoUtils.hpp b/IGC/DebugInfo/DebugInfoUtils.hpp | ||
84 | index b77a550d..88b30a75 100644 | ||
85 | --- a/IGC/DebugInfo/DebugInfoUtils.hpp | ||
86 | +++ b/IGC/DebugInfo/DebugInfoUtils.hpp | ||
87 | @@ -108,11 +108,7 @@ namespace IGC | ||
88 | IGCLLVM::DIBuilder Builder(M); | ||
89 | llvm::DIGlobalVariable* GV = GVs[j]->getVariable(); | ||
90 | llvm::DIScope* scopeToUse = GV->getScope(); | ||
91 | -#if LLVM_VERSION_MAJOR >= 12 | ||
92 | llvm::DILocation* locToUse = llvm::DILocation::get(scopeToUse->getContext(), GV->getLine(), 0, scopeToUse, loc); | ||
93 | -#else | ||
94 | - llvm::DILocation* locToUse = llvm::DebugLoc::get(GV->getLine(), 0, scopeToUse, loc); | ||
95 | -#endif | ||
96 | if (llvm::isa<llvm::DICompileUnit>(GV->getScope())) | ||
97 | { | ||
98 | // Function has no DebugLoc so it is either internal | ||
99 | diff --git a/IGC/DebugInfo/DwarfDebug.cpp b/IGC/DebugInfo/DwarfDebug.cpp | ||
100 | index bd9f17b7..3d9f0835 100644 | ||
101 | --- a/IGC/DebugInfo/DwarfDebug.cpp | ||
102 | +++ b/IGC/DebugInfo/DwarfDebug.cpp | ||
103 | @@ -2102,17 +2102,9 @@ static DebugLoc getFnDebugLoc(DebugLoc DL, const LLVMContext& Ctx) | ||
104 | // Check for number of operands since the compatibility is cheap here. | ||
105 | if (SP->getNumOperands() > 19) | ||
106 | { | ||
107 | -#if LLVM_VERSION_MAJOR >= 12 | ||
108 | return DILocation::get(SP->getContext(), SP->getScopeLine(), 0, SP); | ||
109 | -#else | ||
110 | - return DebugLoc::get(SP->getScopeLine(), 0, SP); | ||
111 | -#endif | ||
112 | } | ||
113 | -#if LLVM_VERSION_MAJOR >= 12 | ||
114 | return DILocation::get(SP->getContext(), SP->getLine(), 0, SP); | ||
115 | -#else | ||
116 | - return DebugLoc::get(SP->getLine(), 0, SP); | ||
117 | -#endif | ||
118 | } | ||
119 | |||
120 | return DebugLoc(); | ||
121 | -- | ||
122 | 2.17.1 | ||
123 | |||