summaryrefslogtreecommitdiffstats
path: root/dynamic-layers/clang-layer/recipes-opencl/igc/files/0003-Review-fixes-for-LLVM-12-phase-2.patch
diff options
context:
space:
mode:
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.patch123
1 files changed, 0 insertions, 123 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
deleted file mode 100644
index 189c2b3f..00000000
--- a/dynamic-layers/clang-layer/recipes-opencl/igc/files/0003-Review-fixes-for-LLVM-12-phase-2.patch
+++ /dev/null
@@ -1,123 +0,0 @@
1From c6d333637537263930acb1b6c5dadb0467d745f6 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?= <zboszor@pr.hu>
3Date: Fri, 26 Feb 2021 06:39:35 +0100
4Subject: [PATCH 3/3] Review fixes for LLVM 12 phase 2
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Upstream-Status: Pending
10
11Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
12Signed-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
21diff --git a/IGC/AdaptorOCL/SPIRV/SPIRVReader.cpp b/IGC/AdaptorOCL/SPIRV/SPIRVReader.cpp
22index 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 }
37diff --git a/IGC/Compiler/Optimizer/OpenCLPasses/AddressSpaceAliasAnalysis/AddressSpaceAliasAnalysis.cpp b/IGC/Compiler/Optimizer/OpenCLPasses/AddressSpaceAliasAnalysis/AddressSpaceAliasAnalysis.cpp
38index 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;
67diff --git a/IGC/Compiler/Optimizer/OpenCLPasses/PrivateMemory/PrivateMemoryResolution.cpp b/IGC/Compiler/Optimizer/OpenCLPasses/PrivateMemory/PrivateMemoryResolution.cpp
68index 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)
83diff --git a/IGC/DebugInfo/DebugInfoUtils.hpp b/IGC/DebugInfo/DebugInfoUtils.hpp
84index 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
99diff --git a/IGC/DebugInfo/DwarfDebug.cpp b/IGC/DebugInfo/DwarfDebug.cpp
100index 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--
1222.17.1
123