]> git.pld-linux.org Git - packages/Mesa.git/blob - llvm-3.1.patch
- rel 3
[packages/Mesa.git] / llvm-3.1.patch
1 From 563489e5c922481a9a506fc5405a3dacacd6082e Mon Sep 17 00:00:00 2001
2 From: José Fonseca <jfonseca@vmware.com>
3 Date: Tue, 15 May 2012 12:10:26 +0000
4 Subject: gallivm: Add MCRegisterInfo.h to silence benign warnings about missing implementation.
5
6 Trivial.
7 ---
8 diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
9 index 9cf2094..444b70a 100644
10 --- a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
11 +++ b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
12 @@ -53,6 +53,9 @@
13  #include <llvm/MC/MCInst.h>
14  #include <llvm/MC/MCInstPrinter.h>
15  #endif /* HAVE_LLVM >= 0x0207 */
16 +#if HAVE_LLVM >= 0x0301
17 +#include <llvm/MC/MCRegisterInfo.h>
18 +#endif /* HAVE_LLVM >= 0x0301 */
19  
20  #include "util/u_math.h"
21  #include "util/u_debug.h"
22 --
23 cgit v0.9.0.2-2-gbebe
24 From fe34006908f1ff99ada34d52c06fd80197e452ec Mon Sep 17 00:00:00 2001
25 From: Vinson Lee <vlee@freedesktop.org>
26 Date: Wed, 14 Mar 2012 05:40:52 +0000
27 Subject: gallivm: Fix createOProfileJITEventListener namespace with llvm-3.1.
28
29 llvm-3.1svn r152620 refactored the OProfile profiling code.
30 createOProfileJITEventListener was moved from the llvm namespace to the
31 llvm::JITEventListener namespace.
32
33 Signed-off-by: Vinson Lee <vlee@freedesktop.org>
34 Reviewed-by: Brian Paul <brianp@vmware.com>
35 ---
36 (limited to 'src/gallium/auxiliary/gallivm/lp_bld_misc.cpp')
37
38 diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
39 index fe7616b..68f8808 100644
40 --- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
41 +++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
42 @@ -62,7 +62,11 @@
43  extern "C" void
44  lp_register_oprofile_jit_event_listener(LLVMExecutionEngineRef EE)
45  {
46 +#if HAVE_LLVM >= 0x0301
47 +   llvm::unwrap(EE)->RegisterJITEventListener(llvm::JITEventListener::createOProfileJITEventListener());
48 +#else
49     llvm::unwrap(EE)->RegisterJITEventListener(llvm::createOProfileJITEventListener());
50 +#endif
51  }
52  
53  
54 --
55 cgit v0.9.0.2-2-gbebe
56 From 1633dcd890d97bd5e4d125d57f2f529f04d14477 Mon Sep 17 00:00:00 2001
57 From: Vinson Lee <vlee@freedesktop.org>
58 Date: Tue, 06 Mar 2012 06:00:40 +0000
59 Subject: gallivm: Pass in a MCRegisterInfo to MCInstPrinter on llvm-3.1.
60
61 llvm-3.1svn r152043 changes createMCInstPrinter to take an additional
62 MCRegisterInfo argument.
63
64 Signed-off-by: Vinson Lee <vlee@freedesktop.org>
65 Reviewed-by: Brian Paul <brianp@vmware.com>
66 ---
67 (limited to 'src/gallium/auxiliary/gallivm/lp_bld_debug.cpp')
68
69 diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
70 index 11209da..b6849cb 100644
71 --- a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
72 +++ b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
73 @@ -243,7 +243,18 @@ lp_disassemble(const void* func)
74     int AsmPrinterVariant = AsmInfo->getAssemblerDialect();
75  #endif
76  
77 -#if HAVE_LLVM >= 0x0300
78 +#if HAVE_LLVM >= 0x0301
79 +   OwningPtr<const MCRegisterInfo> MRI(T->createMCRegInfo(Triple));
80 +   if (!MRI) {
81 +      debug_printf("error: no register info for target %s\n", Triple.c_str());
82 +      return;
83 +   }
84 +#endif
85 +
86 +#if HAVE_LLVM >= 0x0301
87 +   OwningPtr<MCInstPrinter> Printer(
88 +         T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo, *MRI, *STI));
89 +#elif HAVE_LLVM == 0x0300
90     OwningPtr<MCInstPrinter> Printer(
91           T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo, *STI));
92  #elif HAVE_LLVM >= 0x0208
93 --
94 cgit v0.9.0.2-2-gbebe
95 From 4f513002f65c629576252b34efedf3c8c4531dfd Mon Sep 17 00:00:00 2001
96 From: Vinson Lee <vlee@freedesktop.org>
97 Date: Tue, 03 Apr 2012 05:14:15 +0000
98 Subject: gallivm: Pass in a MCInstrInfo to createMCInstPrinter on llvm-3.1.
99
100 llvm-3.1svn r153860 makes MCInstrInfo available to the MCInstPrinter.
101
102 Signed-off-by: Vinson Lee <vlee@freedesktop.org>
103 Reviewed-by: Brian Paul <brianp@vmware.com>
104 ---
105 (limited to 'src/gallium/auxiliary/gallivm/lp_bld_debug.cpp')
106
107 diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
108 index c5afff0..9cf2094 100644
109 --- a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
110 +++ b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
111 @@ -251,11 +251,17 @@ lp_disassemble(const void* func)
112        debug_printf("error: no register info for target %s\n", Triple.c_str());
113        return;
114     }
115 +
116 +   OwningPtr<const MCInstrInfo> MII(T->createMCInstrInfo());
117 +   if (!MII) {
118 +      debug_printf("error: no instruction info for target %s\n", Triple.c_str());
119 +      return;
120 +   }
121  #endif
122  
123  #if HAVE_LLVM >= 0x0301
124     OwningPtr<MCInstPrinter> Printer(
125 -         T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo, *MRI, *STI));
126 +         T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo, *MII, *MRI, *STI));
127  #elif HAVE_LLVM == 0x0300
128     OwningPtr<MCInstPrinter> Printer(
129           T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo, *STI));
130 --
131 cgit v0.9.0.2-2-gbebe
This page took 0.046958 seconds and 4 git commands to generate.