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