Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

101 lines
3.7 KiB

  1. /*===-- llvm-c/Transform/PassManagerBuilder.h - PMB C Interface ---*- C -*-===*\
  2. |* *|
  3. |* The LLVM Compiler Infrastructure *|
  4. |* *|
  5. |* This file is distributed under the University of Illinois Open Source *|
  6. |* License. See LICENSE.TXT for details. *|
  7. |* *|
  8. |*===----------------------------------------------------------------------===*|
  9. |* *|
  10. |* This header declares the C interface to the PassManagerBuilder class. *|
  11. |* *|
  12. \*===----------------------------------------------------------------------===*/
  13. #ifndef LLVM_C_TRANSFORMS_PASSMANAGERBUILDER_H
  14. #define LLVM_C_TRANSFORMS_PASSMANAGERBUILDER_H
  15. #include "llvm-c/Core.h"
  16. typedef struct LLVMOpaquePassManagerBuilder *LLVMPassManagerBuilderRef;
  17. #ifdef __cplusplus
  18. #include "llvm/Transforms/IPO/PassManagerBuilder.h"
  19. extern "C" {
  20. #endif
  21. /**
  22. * @defgroup LLVMCTransformsPassManagerBuilder Pass manager builder
  23. * @ingroup LLVMCTransforms
  24. *
  25. * @{
  26. */
  27. /** See llvm::PassManagerBuilder. */
  28. LLVMPassManagerBuilderRef LLVMPassManagerBuilderCreate(void);
  29. void LLVMPassManagerBuilderDispose(LLVMPassManagerBuilderRef PMB);
  30. /** See llvm::PassManagerBuilder::OptLevel. */
  31. void
  32. LLVMPassManagerBuilderSetOptLevel(LLVMPassManagerBuilderRef PMB,
  33. unsigned OptLevel);
  34. /** See llvm::PassManagerBuilder::SizeLevel. */
  35. void
  36. LLVMPassManagerBuilderSetSizeLevel(LLVMPassManagerBuilderRef PMB,
  37. unsigned SizeLevel);
  38. /** See llvm::PassManagerBuilder::DisableUnitAtATime. */
  39. void
  40. LLVMPassManagerBuilderSetDisableUnitAtATime(LLVMPassManagerBuilderRef PMB,
  41. LLVMBool Value);
  42. /** See llvm::PassManagerBuilder::DisableUnrollLoops. */
  43. void
  44. LLVMPassManagerBuilderSetDisableUnrollLoops(LLVMPassManagerBuilderRef PMB,
  45. LLVMBool Value);
  46. /** See llvm::PassManagerBuilder::DisableSimplifyLibCalls */
  47. void
  48. LLVMPassManagerBuilderSetDisableSimplifyLibCalls(LLVMPassManagerBuilderRef PMB,
  49. LLVMBool Value);
  50. /** See llvm::PassManagerBuilder::Inliner. */
  51. void
  52. LLVMPassManagerBuilderUseInlinerWithThreshold(LLVMPassManagerBuilderRef PMB,
  53. unsigned Threshold);
  54. /** See llvm::PassManagerBuilder::populateFunctionPassManager. */
  55. void
  56. LLVMPassManagerBuilderPopulateFunctionPassManager(LLVMPassManagerBuilderRef PMB,
  57. LLVMPassManagerRef PM);
  58. /** See llvm::PassManagerBuilder::populateModulePassManager. */
  59. void
  60. LLVMPassManagerBuilderPopulateModulePassManager(LLVMPassManagerBuilderRef PMB,
  61. LLVMPassManagerRef PM);
  62. /** See llvm::PassManagerBuilder::populateLTOPassManager. */
  63. void LLVMPassManagerBuilderPopulateLTOPassManager(LLVMPassManagerBuilderRef PMB,
  64. LLVMPassManagerRef PM,
  65. LLVMBool Internalize,
  66. LLVMBool RunInliner);
  67. /**
  68. * @}
  69. */
  70. #ifdef __cplusplus
  71. }
  72. namespace llvm {
  73. inline PassManagerBuilder *unwrap(LLVMPassManagerBuilderRef P) {
  74. return reinterpret_cast<PassManagerBuilder*>(P);
  75. }
  76. inline LLVMPassManagerBuilderRef wrap(PassManagerBuilder *P) {
  77. return reinterpret_cast<LLVMPassManagerBuilderRef>(P);
  78. }
  79. }
  80. #endif
  81. #endif