PassManagerBuilder.h 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. /*===-- llvm-c/Transform/PassManagerBuilder.h - PMB C Interface ---*- C -*-===*\
  7. |* *|
  8. |* Part of the LLVM Project, under the Apache License v2.0 with LLVM *|
  9. |* Exceptions. *|
  10. |* See https://llvm.org/LICENSE.txt for license information. *|
  11. |* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *|
  12. |* *|
  13. |*===----------------------------------------------------------------------===*|
  14. |* *|
  15. |* This header declares the C interface to the PassManagerBuilder class. *|
  16. |* *|
  17. \*===----------------------------------------------------------------------===*/
  18. #ifndef LLVM_C_TRANSFORMS_PASSMANAGERBUILDER_H
  19. #define LLVM_C_TRANSFORMS_PASSMANAGERBUILDER_H
  20. #include "llvm-c/ExternC.h"
  21. #include "llvm-c/Types.h"
  22. typedef struct LLVMOpaquePassManagerBuilder *LLVMPassManagerBuilderRef;
  23. LLVM_C_EXTERN_C_BEGIN
  24. /**
  25. * @defgroup LLVMCTransformsPassManagerBuilder Pass manager builder
  26. * @ingroup LLVMCTransforms
  27. *
  28. * @{
  29. */
  30. /** See llvm::PassManagerBuilder. */
  31. LLVMPassManagerBuilderRef LLVMPassManagerBuilderCreate(void);
  32. void LLVMPassManagerBuilderDispose(LLVMPassManagerBuilderRef PMB);
  33. /** See llvm::PassManagerBuilder::OptLevel. */
  34. void
  35. LLVMPassManagerBuilderSetOptLevel(LLVMPassManagerBuilderRef PMB,
  36. unsigned OptLevel);
  37. /** See llvm::PassManagerBuilder::SizeLevel. */
  38. void
  39. LLVMPassManagerBuilderSetSizeLevel(LLVMPassManagerBuilderRef PMB,
  40. unsigned SizeLevel);
  41. /** See llvm::PassManagerBuilder::DisableUnitAtATime. */
  42. void
  43. LLVMPassManagerBuilderSetDisableUnitAtATime(LLVMPassManagerBuilderRef PMB,
  44. LLVMBool Value);
  45. /** See llvm::PassManagerBuilder::DisableUnrollLoops. */
  46. void
  47. LLVMPassManagerBuilderSetDisableUnrollLoops(LLVMPassManagerBuilderRef PMB,
  48. LLVMBool Value);
  49. /** See llvm::PassManagerBuilder::DisableSimplifyLibCalls */
  50. void
  51. LLVMPassManagerBuilderSetDisableSimplifyLibCalls(LLVMPassManagerBuilderRef PMB,
  52. LLVMBool Value);
  53. /** See llvm::PassManagerBuilder::Inliner. */
  54. void
  55. LLVMPassManagerBuilderUseInlinerWithThreshold(LLVMPassManagerBuilderRef PMB,
  56. unsigned Threshold);
  57. /** See llvm::PassManagerBuilder::populateFunctionPassManager. */
  58. void
  59. LLVMPassManagerBuilderPopulateFunctionPassManager(LLVMPassManagerBuilderRef PMB,
  60. LLVMPassManagerRef PM);
  61. /** See llvm::PassManagerBuilder::populateModulePassManager. */
  62. void
  63. LLVMPassManagerBuilderPopulateModulePassManager(LLVMPassManagerBuilderRef PMB,
  64. LLVMPassManagerRef PM);
  65. /**
  66. * @}
  67. */
  68. LLVM_C_EXTERN_C_END
  69. #endif
  70. #ifdef __GNUC__
  71. #pragma GCC diagnostic pop
  72. #endif