Scalar.h 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. /*===-- Scalar.h - Scalar Transformation Library 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 libLLVMScalarOpts.a, which *|
  11. |* implements various scalar transformations of the LLVM IR. *|
  12. |* *|
  13. |* Many exotic languages can interoperate with C code but have a harder time *|
  14. |* with C++ due to name mangling. So in addition to C, this interface enables *|
  15. |* tools written in such languages. *|
  16. |* *|
  17. \*===----------------------------------------------------------------------===*/
  18. #ifndef LLVM_C_TRANSFORMS_SCALAR_H
  19. #define LLVM_C_TRANSFORMS_SCALAR_H
  20. #include "llvm-c/Core.h"
  21. #ifdef __cplusplus
  22. extern "C" {
  23. #endif
  24. /**
  25. * @defgroup LLVMCTransformsScalar Scalar transformations
  26. * @ingroup LLVMCTransforms
  27. *
  28. * @{
  29. */
  30. /** See llvm::createAggressiveDCEPass function. */
  31. void LLVMAddAggressiveDCEPass(LLVMPassManagerRef PM);
  32. /** See llvm::createBitTrackingDCEPass function. */
  33. void LLVMAddBitTrackingDCEPass(LLVMPassManagerRef PM);
  34. /** See llvm::createAlignmentFromAssumptionsPass function. */
  35. void LLVMAddAlignmentFromAssumptionsPass(LLVMPassManagerRef PM);
  36. /** See llvm::createCFGSimplificationPass function. */
  37. void LLVMAddCFGSimplificationPass(LLVMPassManagerRef PM);
  38. /** See llvm::createDeadStoreEliminationPass function. */
  39. void LLVMAddDeadStoreEliminationPass(LLVMPassManagerRef PM);
  40. /** See llvm::createScalarizerPass function. */
  41. void LLVMAddScalarizerPass(LLVMPassManagerRef PM);
  42. /** See llvm::createMergedLoadStoreMotionPass function. */
  43. void LLVMAddMergedLoadStoreMotionPass(LLVMPassManagerRef PM);
  44. /** See llvm::createGVNPass function. */
  45. void LLVMAddGVNPass(LLVMPassManagerRef PM);
  46. /** See llvm::createIndVarSimplifyPass function. */
  47. void LLVMAddIndVarSimplifyPass(LLVMPassManagerRef PM);
  48. /** See llvm::createInstructionCombiningPass function. */
  49. void LLVMAddInstructionCombiningPass(LLVMPassManagerRef PM);
  50. /** See llvm::createJumpThreadingPass function. */
  51. void LLVMAddJumpThreadingPass(LLVMPassManagerRef PM);
  52. /** See llvm::createLICMPass function. */
  53. void LLVMAddLICMPass(LLVMPassManagerRef PM);
  54. /** See llvm::createLoopDeletionPass function. */
  55. void LLVMAddLoopDeletionPass(LLVMPassManagerRef PM);
  56. /** See llvm::createLoopIdiomPass function */
  57. void LLVMAddLoopIdiomPass(LLVMPassManagerRef PM);
  58. /** See llvm::createLoopRotatePass function. */
  59. void LLVMAddLoopRotatePass(LLVMPassManagerRef PM);
  60. /** See llvm::createLoopRerollPass function. */
  61. void LLVMAddLoopRerollPass(LLVMPassManagerRef PM);
  62. /** See llvm::createLoopUnrollPass function. */
  63. void LLVMAddLoopUnrollPass(LLVMPassManagerRef PM);
  64. /** See llvm::createLoopUnswitchPass function. */
  65. void LLVMAddLoopUnswitchPass(LLVMPassManagerRef PM);
  66. /** See llvm::createMemCpyOptPass function. */
  67. void LLVMAddMemCpyOptPass(LLVMPassManagerRef PM);
  68. /** See llvm::createPartiallyInlineLibCallsPass function. */
  69. void LLVMAddPartiallyInlineLibCallsPass(LLVMPassManagerRef PM);
  70. /** See llvm::createLowerSwitchPass function. */
  71. void LLVMAddLowerSwitchPass(LLVMPassManagerRef PM);
  72. /** See llvm::createPromoteMemoryToRegisterPass function. */
  73. void LLVMAddPromoteMemoryToRegisterPass(LLVMPassManagerRef PM);
  74. /** See llvm::createReassociatePass function. */
  75. void LLVMAddReassociatePass(LLVMPassManagerRef PM);
  76. /** See llvm::createSCCPPass function. */
  77. void LLVMAddSCCPPass(LLVMPassManagerRef PM);
  78. /** See llvm::createScalarReplAggregatesPass function. */
  79. void LLVMAddScalarReplAggregatesPass(LLVMPassManagerRef PM);
  80. /** See llvm::createScalarReplAggregatesPass function. */
  81. void LLVMAddScalarReplAggregatesPassSSA(LLVMPassManagerRef PM);
  82. /** See llvm::createScalarReplAggregatesPass function. */
  83. void LLVMAddScalarReplAggregatesPassWithThreshold(LLVMPassManagerRef PM,
  84. int Threshold);
  85. /** See llvm::createSimplifyLibCallsPass function. */
  86. void LLVMAddSimplifyLibCallsPass(LLVMPassManagerRef PM);
  87. /** See llvm::createTailCallEliminationPass function. */
  88. void LLVMAddTailCallEliminationPass(LLVMPassManagerRef PM);
  89. /** See llvm::createConstantPropagationPass function. */
  90. void LLVMAddConstantPropagationPass(LLVMPassManagerRef PM);
  91. /** See llvm::demotePromoteMemoryToRegisterPass function. */
  92. void LLVMAddDemoteMemoryToRegisterPass(LLVMPassManagerRef PM);
  93. /** See llvm::createVerifierPass function. */
  94. void LLVMAddVerifierPass(LLVMPassManagerRef PM);
  95. /** See llvm::createCorrelatedValuePropagationPass function */
  96. void LLVMAddCorrelatedValuePropagationPass(LLVMPassManagerRef PM);
  97. /** See llvm::createEarlyCSEPass function */
  98. void LLVMAddEarlyCSEPass(LLVMPassManagerRef PM);
  99. /** See llvm::createLowerExpectIntrinsicPass function */
  100. void LLVMAddLowerExpectIntrinsicPass(LLVMPassManagerRef PM);
  101. /** See llvm::createTypeBasedAliasAnalysisPass function */
  102. void LLVMAddTypeBasedAliasAnalysisPass(LLVMPassManagerRef PM);
  103. /** See llvm::createScopedNoAliasAAPass function */
  104. void LLVMAddScopedNoAliasAAPass(LLVMPassManagerRef PM);
  105. /** See llvm::createBasicAliasAnalysisPass function */
  106. void LLVMAddBasicAliasAnalysisPass(LLVMPassManagerRef PM);
  107. /**
  108. * @}
  109. */
  110. #ifdef __cplusplus
  111. }
  112. #endif /* defined(__cplusplus) */
  113. #endif