Scalar.h revision 199481
1231200Smm/*===-- Scalar.h - Scalar Transformation Library C Interface ----*- C++ -*-===*\ 2231200Smm|* *| 3231200Smm|* The LLVM Compiler Infrastructure *| 4231200Smm|* *| 5231200Smm|* This file is distributed under the University of Illinois Open Source *| 6231200Smm|* License. See LICENSE.TXT for details. *| 7231200Smm|* *| 8231200Smm|*===----------------------------------------------------------------------===*| 9231200Smm|* *| 10231200Smm|* This header declares the C interface to libLLVMScalarOpts.a, which *| 11231200Smm|* implements various scalar transformations of the LLVM IR. *| 12231200Smm|* *| 13231200Smm|* Many exotic languages can interoperate with C code but have a harder time *| 14231200Smm|* with C++ due to name mangling. So in addition to C, this interface enables *| 15231200Smm|* tools written in such languages. *| 16231200Smm|* *| 17231200Smm\*===----------------------------------------------------------------------===*/ 18231200Smm 19231200Smm#ifndef LLVM_C_TRANSFORMS_SCALAR_H 20231200Smm#define LLVM_C_TRANSFORMS_SCALAR_H 21231200Smm 22231200Smm#include "llvm-c/Core.h" 23231200Smm 24231200Smm#ifdef __cplusplus 25231200Smmextern "C" { 26231200Smm#endif 27231200Smm 28231200Smm/** See llvm::createAggressiveDCEPass function. */ 29231200Smmvoid LLVMAddAggressiveDCEPass(LLVMPassManagerRef PM); 30231200Smm 31231200Smm/** See llvm::createCFGSimplificationPass function. */ 32231200Smmvoid LLVMAddCFGSimplificationPass(LLVMPassManagerRef PM); 33231200Smm 34231200Smm/** See llvm::createDeadStoreEliminationPass function. */ 35231200Smmvoid LLVMAddDeadStoreEliminationPass(LLVMPassManagerRef PM); 36231200Smm 37231200Smm/** See llvm::createGVNPass function. */ 38231200Smmvoid LLVMAddGVNPass(LLVMPassManagerRef PM); 39231200Smm 40231200Smm/** See llvm::createIndVarSimplifyPass function. */ 41231200Smmvoid LLVMAddIndVarSimplifyPass(LLVMPassManagerRef PM); 42231200Smm 43231200Smm/** See llvm::createInstructionCombiningPass function. */ 44231200Smmvoid LLVMAddInstructionCombiningPass(LLVMPassManagerRef PM); 45231200Smm 46231200Smm/** See llvm::createJumpThreadingPass function. */ 47231200Smmvoid LLVMAddJumpThreadingPass(LLVMPassManagerRef PM); 48231200Smm 49231200Smm/** See llvm::createLICMPass function. */ 50231200Smmvoid LLVMAddLICMPass(LLVMPassManagerRef PM); 51231200Smm 52231200Smm/** See llvm::createLoopDeletionPass function. */ 53231200Smmvoid LLVMAddLoopDeletionPass(LLVMPassManagerRef PM); 54231200Smm 55231200Smm/** See llvm::createLoopIndexSplitPass function. */ 56231200Smmvoid LLVMAddLoopIndexSplitPass(LLVMPassManagerRef PM); 57231200Smm 58231200Smm/** See llvm::createLoopRotatePass function. */ 59231200Smmvoid LLVMAddLoopRotatePass(LLVMPassManagerRef PM); 60231200Smm 61231200Smm/** See llvm::createLoopUnrollPass function. */ 62231200Smmvoid LLVMAddLoopUnrollPass(LLVMPassManagerRef PM); 63231200Smm 64231200Smm/** See llvm::createLoopUnswitchPass function. */ 65231200Smmvoid LLVMAddLoopUnswitchPass(LLVMPassManagerRef PM); 66231200Smm 67231200Smm/** See llvm::createMemCpyOptPass function. */ 68231200Smmvoid LLVMAddMemCpyOptPass(LLVMPassManagerRef PM); 69231200Smm 70231200Smm/** See llvm::createPromoteMemoryToRegisterPass function. */ 71231200Smmvoid LLVMAddPromoteMemoryToRegisterPass(LLVMPassManagerRef PM); 72231200Smm 73231200Smm/** See llvm::createReassociatePass function. */ 74231200Smmvoid LLVMAddReassociatePass(LLVMPassManagerRef PM); 75231200Smm 76231200Smm/** See llvm::createSCCPPass function. */ 77248616Smmvoid LLVMAddSCCPPass(LLVMPassManagerRef PM); 78231200Smm 79231200Smm/** See llvm::createScalarReplAggregatesPass function. */ 80231200Smmvoid LLVMAddScalarReplAggregatesPass(LLVMPassManagerRef PM); 81231200Smm 82231200Smm/** See llvm::createSimplifyLibCallsPass function. */ 83231200Smmvoid LLVMAddSimplifyLibCallsPass(LLVMPassManagerRef PM); 84 85/** See llvm::createTailCallEliminationPass function. */ 86void LLVMAddTailCallEliminationPass(LLVMPassManagerRef PM); 87 88/** See llvm::createConstantPropagationPass function. */ 89void LLVMAddConstantPropagationPass(LLVMPassManagerRef PM); 90 91/** See llvm::demotePromoteMemoryToRegisterPass function. */ 92void LLVMAddDemoteMemoryToRegisterPass(LLVMPassManagerRef PM); 93 94#ifdef __cplusplus 95} 96#endif /* defined(__cplusplus) */ 97 98#endif 99