]> git.pld-linux.org Git - packages/beignet.git/blame - beignet-llvm6-support.patch
- merged some Debian patches
[packages/beignet.git] / beignet-llvm6-support.patch
CommitLineData
7d3d7cb5
JB
1Description: Support LLVM 6
2
3LLVMContext::setDiagnosticHandler is renamed
4LoopInfo::markAsRemoved is partly replaced by LoopInfo::erase,
5but that doesn't remove the loop from the queue
6
7Author: Rebecca N. Palmer <rebecca_palmer@zoho.com>
8Forwarded: https://lists.freedesktop.org/archives/beignet/2018-July/009211.html (original), https://lists.freedesktop.org/archives/beignet/2019-January/009222.html (#913141 fix)
9
10--- a/backend/src/llvm/llvm_to_gen.cpp
11+++ b/backend/src/llvm/llvm_to_gen.cpp
12@@ -322,7 +322,11 @@ namespace gbe
13 DataLayout DL(&mod);
14
15 gbeDiagnosticContext dc;
16+#if LLVM_VERSION_MAJOR >= 6
17+ mod.getContext().setDiagnosticHandlerCallBack(&gbeDiagnosticHandler,&dc);
18+#else
19 mod.getContext().setDiagnosticHandler(&gbeDiagnosticHandler,&dc);
20+#endif
21
22 #if LLVM_VERSION_MAJOR * 10 + LLVM_VERSION_MINOR >= 37
23 mod.setDataLayout(DL);
24--- a/backend/src/llvm/llvm_unroll.cpp
25+++ b/backend/src/llvm/llvm_unroll.cpp
26@@ -205,7 +205,10 @@ namespace gbe {
27 if (parentTripCount != 0 && currTripCount * parentTripCount > 32) {
28 //Don't change the unrollID if doesn't force unroll.
29 //setUnrollID(parentL, false);
30-#if LLVM_VERSION_MAJOR * 10 + LLVM_VERSION_MINOR >= 38
31+#if LLVM_VERSION_MAJOR >= 6
32+ LPM.markLoopAsDeleted(*parentL);
33+ loopInfo.erase(parentL);
34+#elif LLVM_VERSION_MAJOR * 10 + LLVM_VERSION_MINOR >= 38
35 loopInfo.markAsRemoved(parentL);
36 #else
37 LPM.deleteLoopFromQueue(parentL);
This page took 0.078625 seconds and 4 git commands to generate.