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 deimos.llvm.c.transforms.scalar; 20 21 import deimos.llvm.c.core; 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::createCFGSimplificationPass function. */ 36 void LLVMAddCFGSimplificationPass(LLVMPassManagerRef PM); 37 38 /** See llvm::createDeadStoreEliminationPass function. */ 39 void LLVMAddDeadStoreEliminationPass(LLVMPassManagerRef PM); 40 41 /** See llvm::createGVNPass function. */ 42 void LLVMAddGVNPass(LLVMPassManagerRef PM); 43 44 /** See llvm::createIndVarSimplifyPass function. */ 45 void LLVMAddIndVarSimplifyPass(LLVMPassManagerRef PM); 46 47 /** See llvm::createInstructionCombiningPass function. */ 48 void LLVMAddInstructionCombiningPass(LLVMPassManagerRef PM); 49 50 /** See llvm::createJumpThreadingPass function. */ 51 void LLVMAddJumpThreadingPass(LLVMPassManagerRef PM); 52 53 /** See llvm::createLICMPass function. */ 54 void LLVMAddLICMPass(LLVMPassManagerRef PM); 55 56 /** See llvm::createLoopDeletionPass function. */ 57 void LLVMAddLoopDeletionPass(LLVMPassManagerRef PM); 58 59 /** See llvm::createLoopIdiomPass function */ 60 void LLVMAddLoopIdiomPass(LLVMPassManagerRef PM); 61 62 /** See llvm::createLoopRotatePass function. */ 63 void LLVMAddLoopRotatePass(LLVMPassManagerRef PM); 64 65 /** See llvm::createLoopUnrollPass function. */ 66 void LLVMAddLoopUnrollPass(LLVMPassManagerRef PM); 67 68 /** See llvm::createLoopUnswitchPass function. */ 69 void LLVMAddLoopUnswitchPass(LLVMPassManagerRef PM); 70 71 /** See llvm::createMemCpyOptPass function. */ 72 void LLVMAddMemCpyOptPass(LLVMPassManagerRef PM); 73 74 /** See llvm::createPromoteMemoryToRegisterPass function. */ 75 void LLVMAddPromoteMemoryToRegisterPass(LLVMPassManagerRef PM); 76 77 /** See llvm::createReassociatePass function. */ 78 void LLVMAddReassociatePass(LLVMPassManagerRef PM); 79 80 /** See llvm::createSCCPPass function. */ 81 void LLVMAddSCCPPass(LLVMPassManagerRef PM); 82 83 /** See llvm::createScalarReplAggregatesPass function. */ 84 void LLVMAddScalarReplAggregatesPass(LLVMPassManagerRef PM); 85 86 /** See llvm::createScalarReplAggregatesPass function. */ 87 void LLVMAddScalarReplAggregatesPassSSA(LLVMPassManagerRef PM); 88 89 /** See llvm::createScalarReplAggregatesPass function. */ 90 void LLVMAddScalarReplAggregatesPassWithThreshold(LLVMPassManagerRef PM, 91 int Threshold); 92 93 /** See llvm::createSimplifyLibCallsPass function. */ 94 void LLVMAddSimplifyLibCallsPass(LLVMPassManagerRef PM); 95 96 /** See llvm::createTailCallEliminationPass function. */ 97 void LLVMAddTailCallEliminationPass(LLVMPassManagerRef PM); 98 99 /** See llvm::createConstantPropagationPass function. */ 100 void LLVMAddConstantPropagationPass(LLVMPassManagerRef PM); 101 102 /** See llvm::demotePromoteMemoryToRegisterPass function. */ 103 void LLVMAddDemoteMemoryToRegisterPass(LLVMPassManagerRef PM); 104 105 /** See llvm::createVerifierPass function. */ 106 void LLVMAddVerifierPass(LLVMPassManagerRef PM); 107 108 /** See llvm::createCorrelatedValuePropagationPass function */ 109 void LLVMAddCorrelatedValuePropagationPass(LLVMPassManagerRef PM); 110 111 /** See llvm::createEarlyCSEPass function */ 112 void LLVMAddEarlyCSEPass(LLVMPassManagerRef PM); 113 114 /** See llvm::createLowerExpectIntrinsicPass function */ 115 void LLVMAddLowerExpectIntrinsicPass(LLVMPassManagerRef PM); 116 117 /** See llvm::createTypeBasedAliasAnalysisPass function */ 118 void LLVMAddTypeBasedAliasAnalysisPass(LLVMPassManagerRef PM); 119 120 /** See llvm::createBasicAliasAnalysisPass function */ 121 void LLVMAddBasicAliasAnalysisPass(LLVMPassManagerRef PM); 122 123 /** 124 * @} 125 */