PageRenderTime 14ms CodeModel.GetById 8ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/JIT/global_llvm_data_fwd.h

http://unladen-swallow.googlecode.com/
C++ Header | 44 lines | 26 code | 10 blank | 8 comment | 0 complexity | 6f2bcdbaf75d2d546ed3a48277c4e9ef MD5 | raw file
 1/* Forward declares some functions using PyGlobalLlvmData so that C
 2   files can use them.  See global_llvm_data.h for the full C++
 3   interface. */
 4#ifndef PYTHON_GLOBAL_LLVM_DATA_FWD_H
 5#define PYTHON_GLOBAL_LLVM_DATA_FWD_H
 6
 7#include "Python.h"
 8
 9#ifdef __cplusplus
10extern "C" {
11#endif
12
13#ifdef WITH_LLVM
14#define PyGlobalLlvmData_GET() (PyThreadState_GET()->interp->global_llvm_data)
15
16struct PyGlobalLlvmData *PyGlobalLlvmData_New(void);
17void PyGlobalLlvmData_Clear(struct PyGlobalLlvmData *);
18void PyGlobalLlvmData_Free(struct PyGlobalLlvmData *);
19
20#define Py_MIN_LLVM_OPT_LEVEL 0
21#define Py_DEFAULT_JIT_OPT_LEVEL 2
22#define Py_MAX_LLVM_OPT_LEVEL 3
23
24/* See global_llvm_data.h:PyGlobalLlvmData::Optimize for documentation. */
25PyAPI_FUNC(int) PyGlobalLlvmData_Optimize(struct PyGlobalLlvmData *,
26                                          _LlvmFunction *, int);
27/* See global_llvm_data.h:PyGlobalLlvmData::CollectUnusedGlobals. */
28PyAPI_FUNC(void) PyGlobalLlvmData_CollectUnusedGlobals(
29    struct PyGlobalLlvmData *);
30
31/* Initializes LLVM and all of the LLVM wrapper types. */
32int _PyLlvm_Init(void);
33
34/* Finalizes LLVM. */
35void _PyLlvm_Fini(void);
36
37/* Sets LLVM debug output on or off. */
38PyAPI_FUNC(int) PyLlvm_SetDebug(int on);
39#endif  /* WITH_LLVM */
40
41#ifdef __cplusplus
42}
43#endif
44#endif  /* PYTHON_GLOBAL_LLVM_DATA_FWD_H */