/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. #include "Python.h"
  7. #ifdef __cplusplus
  8. extern "C" {
  9. #endif
  10. #ifdef WITH_LLVM
  11. #define PyGlobalLlvmData_GET() (PyThreadState_GET()->interp->global_llvm_data)
  12. struct PyGlobalLlvmData *PyGlobalLlvmData_New(void);
  13. void PyGlobalLlvmData_Clear(struct PyGlobalLlvmData *);
  14. void PyGlobalLlvmData_Free(struct PyGlobalLlvmData *);
  15. #define Py_MIN_LLVM_OPT_LEVEL 0
  16. #define Py_DEFAULT_JIT_OPT_LEVEL 2
  17. #define Py_MAX_LLVM_OPT_LEVEL 3
  18. /* See global_llvm_data.h:PyGlobalLlvmData::Optimize for documentation. */
  19. PyAPI_FUNC(int) PyGlobalLlvmData_Optimize(struct PyGlobalLlvmData *,
  20. _LlvmFunction *, int);
  21. /* See global_llvm_data.h:PyGlobalLlvmData::CollectUnusedGlobals. */
  22. PyAPI_FUNC(void) PyGlobalLlvmData_CollectUnusedGlobals(
  23. struct PyGlobalLlvmData *);
  24. /* Initializes LLVM and all of the LLVM wrapper types. */
  25. int _PyLlvm_Init(void);
  26. /* Finalizes LLVM. */
  27. void _PyLlvm_Fini(void);
  28. /* Sets LLVM debug output on or off. */
  29. PyAPI_FUNC(int) PyLlvm_SetDebug(int on);
  30. #endif /* WITH_LLVM */
  31. #ifdef __cplusplus
  32. }
  33. #endif
  34. #endif /* PYTHON_GLOBAL_LLVM_DATA_FWD_H */