View | Details | Raw Unified | Return to bug 230789 | Differences between
and this patch

Collapse All | Expand All

(-)b/lang/beignet/files/patch-llvm8 (+51 lines)
Added Link Here
1
Regressed by https://github.com/llvm/llvm-project/commit/721d95713a9e
2
3
unable to load /usr/local/lib/beignet//libgbeinterp.so which is part of the driver, please check!
4
ld-elf.so.1: /usr/local/lib/beignet//libgbeinterp.so: Undefined symbol "_ZN4llvm24DisableABIBreakingChecksE"
5
6
Regressed by https://github.com/llvm/llvm-project/commit/4a2d58e16acc
7
8
backend/src/llvm/llvm_gen_backend.cpp:3076:5: error:
9
      unknown type name 'TerminatorInst'
10
    TerminatorInst *term = bb->getTerminator();
11
    ^
12
backend/src/llvm/llvm_gen_backend.cpp:3083:5: error:
13
      unknown type name 'TerminatorInst'
14
    TerminatorInst *term = bb->getTerminator();
15
    ^
16
17
--- backend/src/CMakeLists.txt.orig	2017-09-22 08:05:22 UTC
18
+++ backend/src/CMakeLists.txt
19
@@ -168,6 +168,7 @@ add_dependencies(gbe beignet_bitcode)
20
 endif (NOT (USE_STANDALONE_GBE_COMPILER STREQUAL "true"))
21
 
22
 add_library(gbeinterp SHARED gbe_bin_interpreter.cpp)
23
+target_link_libraries(gbeinterp ${LLVM_MODULE_LIBS})
24
 
25
 if (LLVM_VERSION_NODOT VERSION_EQUAL 34)
26
   find_library(TERMINFO NAMES tinfo ncurses)
27
--- backend/src/llvm/llvm_gen_backend.cpp.orig	2017-10-24 06:04:48 UTC
28
+++ backend/src/llvm/llvm_gen_backend.cpp
29
@@ -3073,14 +3073,22 @@ namespace gbe
30
 
31
 
32
   static unsigned getChildNo(BasicBlock *bb) {
33
+#if LLVM_VERSION_MAJOR < 8
34
     TerminatorInst *term = bb->getTerminator();
35
+#else
36
+    Instruction *term = bb->getTerminator();
37
+#endif
38
     return term->getNumSuccessors();
39
   }
40
 
41
   // return NULL if index out-range of children number
42
   static BasicBlock *getChildPossible(BasicBlock *bb, unsigned index) {
43
 
44
+#if LLVM_VERSION_MAJOR < 8
45
     TerminatorInst *term = bb->getTerminator();
46
+#else
47
+    Instruction *term = bb->getTerminator();
48
+#endif
49
     unsigned childNo = term->getNumSuccessors();
50
     BasicBlock *child = NULL;
51
     if(index < childNo) {

Return to bug 230789