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 19 module llvm.c.transforms.scalar; 20 21 public import llvm.c.types; 22 23 extern(C) nothrow: 24 25 /** 26 * @defgroup LLVMCTransformsScalar Scalar transformations 27 * @ingroup LLVMCTransforms 28 * 29 * @{ 30 */ 31 32 /** See llvm::createAggressiveDCEPass function. */ 33 void LLVMAddAggressiveDCEPass(LLVMPassManagerRef PM); 34 35 /** See llvm::createBitTrackingDCEPass function. */ 36 void LLVMAddBitTrackingDCEPass(LLVMPassManagerRef PM); 37 38 /** See llvm::createAlignmentFromAssumptionsPass function. */ 39 void LLVMAddAlignmentFromAssumptionsPass(LLVMPassManagerRef PM); 40 41 /** See llvm::createCFGSimplificationPass function. */ 42 void LLVMAddCFGSimplificationPass(LLVMPassManagerRef PM); 43 44 /** See llvm::createDeadStoreEliminationPass function. */ 45 void LLVMAddDeadStoreEliminationPass(LLVMPassManagerRef PM); 46 47 /** See llvm::createScalarizerPass function. */ 48 void LLVMAddScalarizerPass(LLVMPassManagerRef PM); 49 50 /** See llvm::createMergedLoadStoreMotionPass function. */ 51 void LLVMAddMergedLoadStoreMotionPass(LLVMPassManagerRef PM); 52 53 /** See llvm::createGVNPass function. */ 54 void LLVMAddGVNPass(LLVMPassManagerRef PM); 55 56 /** See llvm::createIndVarSimplifyPass function. */ 57 void LLVMAddIndVarSimplifyPass(LLVMPassManagerRef PM); 58 59 /** See llvm::createInstructionCombiningPass function. */ 60 void LLVMAddInstructionCombiningPass(LLVMPassManagerRef PM); 61 62 /** See llvm::createJumpThreadingPass function. */ 63 void LLVMAddJumpThreadingPass(LLVMPassManagerRef PM); 64 65 /** See llvm::createLICMPass function. */ 66 void LLVMAddLICMPass(LLVMPassManagerRef PM); 67 68 /** See llvm::createLoopDeletionPass function. */ 69 void LLVMAddLoopDeletionPass(LLVMPassManagerRef PM); 70 71 /** See llvm::createLoopIdiomPass function */ 72 void LLVMAddLoopIdiomPass(LLVMPassManagerRef PM); 73 74 /** See llvm::createLoopRotatePass function. */ 75 void LLVMAddLoopRotatePass(LLVMPassManagerRef PM); 76 77 /** See llvm::createLoopRerollPass function. */ 78 void LLVMAddLoopRerollPass(LLVMPassManagerRef PM); 79 80 /** See llvm::createLoopUnrollPass function. */ 81 void LLVMAddLoopUnrollPass(LLVMPassManagerRef PM); 82 83 /** See llvm::createLoopUnswitchPass function. */ 84 void LLVMAddLoopUnswitchPass(LLVMPassManagerRef PM); 85 86 /** See llvm::createMemCpyOptPass function. */ 87 void LLVMAddMemCpyOptPass(LLVMPassManagerRef PM); 88 89 /** See llvm::createPartiallyInlineLibCallsPass function. */ 90 void LLVMAddPartiallyInlineLibCallsPass(LLVMPassManagerRef PM); 91 92 /** See llvm::createLowerSwitchPass function. */ 93 void LLVMAddLowerSwitchPass(LLVMPassManagerRef PM); 94 95 /** See llvm::createPromoteMemoryToRegisterPass function. */ 96 void LLVMAddPromoteMemoryToRegisterPass(LLVMPassManagerRef PM); 97 98 /** See llvm::createReassociatePass function. */ 99 void LLVMAddReassociatePass(LLVMPassManagerRef PM); 100 101 /** See llvm::createSCCPPass function. */ 102 void LLVMAddSCCPPass(LLVMPassManagerRef PM); 103 104 /** See llvm::createScalarReplAggregatesPass function. */ 105 void LLVMAddScalarReplAggregatesPass(LLVMPassManagerRef PM); 106 107 /** See llvm::createScalarReplAggregatesPass function. */ 108 void LLVMAddScalarReplAggregatesPassSSA(LLVMPassManagerRef PM); 109 110 /** See llvm::createScalarReplAggregatesPass function. */ 111 void LLVMAddScalarReplAggregatesPassWithThreshold(LLVMPassManagerRef PM, 112 int Threshold); 113 114 /** See llvm::createSimplifyLibCallsPass function. */ 115 void LLVMAddSimplifyLibCallsPass(LLVMPassManagerRef PM); 116 117 /** See llvm::createTailCallEliminationPass function. */ 118 void LLVMAddTailCallEliminationPass(LLVMPassManagerRef PM); 119 120 /** See llvm::createConstantPropagationPass function. */ 121 void LLVMAddConstantPropagationPass(LLVMPassManagerRef PM); 122 123 /** See llvm::demotePromoteMemoryToRegisterPass function. */ 124 void LLVMAddDemoteMemoryToRegisterPass(LLVMPassManagerRef PM); 125 126 /** See llvm::createVerifierPass function. */ 127 void LLVMAddVerifierPass(LLVMPassManagerRef PM); 128 129 /** See llvm::createCorrelatedValuePropagationPass function */ 130 void LLVMAddCorrelatedValuePropagationPass(LLVMPassManagerRef PM); 131 132 /** See llvm::createEarlyCSEPass function */ 133 void LLVMAddEarlyCSEPass(LLVMPassManagerRef PM); 134 135 /** See llvm::createLowerExpectIntrinsicPass function */ 136 void LLVMAddLowerExpectIntrinsicPass(LLVMPassManagerRef PM); 137 138 /** See llvm::createTypeBasedAliasAnalysisPass function */ 139 void LLVMAddTypeBasedAliasAnalysisPass(LLVMPassManagerRef PM); 140 141 /** See llvm::createScopedNoAliasAAPass function */ 142 void LLVMAddScopedNoAliasAAPass(LLVMPassManagerRef PM); 143 144 /** See llvm::createBasicAliasAnalysisPass function */ 145 void LLVMAddBasicAliasAnalysisPass(LLVMPassManagerRef PM); 146 147 /** 148 * @} 149 */