Scalar.h revision 302408
1227569Sphilip/*===-- Scalar.h - Scalar Transformation Library C Interface ----*- C++ -*-===*\ 2283514Sarybchik|* *| 3283514Sarybchik|* The LLVM Compiler Infrastructure *| 4227569Sphilip|* *| 5227569Sphilip|* This file is distributed under the University of Illinois Open Source *| 6283514Sarybchik|* License. See LICENSE.TXT for details. *| 7227569Sphilip|* *| 8283514Sarybchik|*===----------------------------------------------------------------------===*| 9283514Sarybchik|* *| 10283514Sarybchik|* This header declares the C interface to libLLVMScalarOpts.a, which *| 11283514Sarybchik|* implements various scalar transformations of the LLVM IR. *| 12283514Sarybchik|* *| 13283514Sarybchik|* Many exotic languages can interoperate with C code but have a harder time *| 14283514Sarybchik|* with C++ due to name mangling. So in addition to C, this interface enables *| 15283514Sarybchik|* tools written in such languages. *| 16283514Sarybchik|* *| 17283514Sarybchik\*===----------------------------------------------------------------------===*/ 18283514Sarybchik 19283514Sarybchik#ifndef LLVM_C_TRANSFORMS_SCALAR_H 20283514Sarybchik#define LLVM_C_TRANSFORMS_SCALAR_H 21283514Sarybchik 22283514Sarybchik#include "llvm-c/Types.h" 23283514Sarybchik 24283514Sarybchik#ifdef __cplusplus 25283514Sarybchikextern "C" { 26283514Sarybchik#endif 27283514Sarybchik 28283514Sarybchik/** 29227569Sphilip * @defgroup LLVMCTransformsScalar Scalar transformations 30227569Sphilip * @ingroup LLVMCTransforms 31228078Sphilip * 32228078Sphilip * @{ 33228078Sphilip */ 34227569Sphilip 35227569Sphilip/** See llvm::createAggressiveDCEPass function. */ 36227569Sphilipvoid LLVMAddAggressiveDCEPass(LLVMPassManagerRef PM); 37227569Sphilip 38227569Sphilip/** See llvm::createBitTrackingDCEPass function. */ 39291436Sarybchikvoid LLVMAddBitTrackingDCEPass(LLVMPassManagerRef PM); 40227569Sphilip 41227569Sphilip/** See llvm::createAlignmentFromAssumptionsPass function. */ 42227569Sphilipvoid LLVMAddAlignmentFromAssumptionsPass(LLVMPassManagerRef PM); 43227569Sphilip 44227569Sphilip/** See llvm::createCFGSimplificationPass function. */ 45291436Sarybchikvoid LLVMAddCFGSimplificationPass(LLVMPassManagerRef PM); 46227569Sphilip 47227569Sphilip/** See llvm::createDeadStoreEliminationPass function. */ 48227569Sphilipvoid LLVMAddDeadStoreEliminationPass(LLVMPassManagerRef PM); 49227569Sphilip 50227569Sphilip/** See llvm::createScalarizerPass function. */ 51227569Sphilipvoid LLVMAddScalarizerPass(LLVMPassManagerRef PM); 52227569Sphilip 53227569Sphilip/** See llvm::createMergedLoadStoreMotionPass function. */ 54227569Sphilipvoid LLVMAddMergedLoadStoreMotionPass(LLVMPassManagerRef PM); 55227569Sphilip 56227569Sphilip/** See llvm::createGVNPass function. */ 57227569Sphilipvoid LLVMAddGVNPass(LLVMPassManagerRef PM); 58227569Sphilip 59227569Sphilip/** See llvm::createIndVarSimplifyPass function. */ 60227569Sphilipvoid LLVMAddIndVarSimplifyPass(LLVMPassManagerRef PM); 61227569Sphilip 62227569Sphilip/** See llvm::createInstructionCombiningPass function. */ 63227569Sphilipvoid LLVMAddInstructionCombiningPass(LLVMPassManagerRef PM); 64227569Sphilip 65227569Sphilip/** See llvm::createJumpThreadingPass function. */ 66227569Sphilipvoid LLVMAddJumpThreadingPass(LLVMPassManagerRef PM); 67227569Sphilip 68227569Sphilip/** See llvm::createLICMPass function. */ 69283514Sarybchikvoid LLVMAddLICMPass(LLVMPassManagerRef PM); 70283514Sarybchik 71283514Sarybchik/** See llvm::createLoopDeletionPass function. */ 72227569Sphilipvoid LLVMAddLoopDeletionPass(LLVMPassManagerRef PM); 73227569Sphilip 74227569Sphilip/** See llvm::createLoopIdiomPass function */ 75227569Sphilipvoid LLVMAddLoopIdiomPass(LLVMPassManagerRef PM); 76227569Sphilip 77227569Sphilip/** See llvm::createLoopRotatePass function. */ 78227569Sphilipvoid LLVMAddLoopRotatePass(LLVMPassManagerRef PM); 79227569Sphilip 80227569Sphilip/** See llvm::createLoopRerollPass function. */ 81227569Sphilipvoid LLVMAddLoopRerollPass(LLVMPassManagerRef PM); 82227569Sphilip 83227569Sphilip/** See llvm::createLoopUnrollPass function. */ 84227569Sphilipvoid LLVMAddLoopUnrollPass(LLVMPassManagerRef PM); 85227569Sphilip 86227569Sphilip/** See llvm::createLoopUnswitchPass function. */ 87227569Sphilipvoid LLVMAddLoopUnswitchPass(LLVMPassManagerRef PM); 88227569Sphilip 89227569Sphilip/** See llvm::createMemCpyOptPass function. */ 90227569Sphilipvoid LLVMAddMemCpyOptPass(LLVMPassManagerRef PM); 91227569Sphilip 92227569Sphilip/** See llvm::createPartiallyInlineLibCallsPass function. */ 93227569Sphilipvoid LLVMAddPartiallyInlineLibCallsPass(LLVMPassManagerRef PM); 94227569Sphilip 95227569Sphilip/** See llvm::createLowerSwitchPass function. */ 96227569Sphilipvoid LLVMAddLowerSwitchPass(LLVMPassManagerRef PM); 97291436Sarybchik 98227569Sphilip/** See llvm::createPromoteMemoryToRegisterPass function. */ 99227569Sphilipvoid LLVMAddPromoteMemoryToRegisterPass(LLVMPassManagerRef PM); 100227569Sphilip 101227569Sphilip/** See llvm::createReassociatePass function. */ 102227569Sphilipvoid LLVMAddReassociatePass(LLVMPassManagerRef PM); 103227569Sphilip 104291436Sarybchik/** See llvm::createSCCPPass function. */ 105227569Sphilipvoid LLVMAddSCCPPass(LLVMPassManagerRef PM); 106227569Sphilip 107283514Sarybchik/** See llvm::createScalarReplAggregatesPass function. */ 108227569Sphilipvoid LLVMAddScalarReplAggregatesPass(LLVMPassManagerRef PM); 109227569Sphilip 110227569Sphilip/** See llvm::createScalarReplAggregatesPass function. */ 111227569Sphilipvoid LLVMAddScalarReplAggregatesPassSSA(LLVMPassManagerRef PM); 112291436Sarybchik 113227569Sphilip/** See llvm::createScalarReplAggregatesPass function. */ 114227569Sphilipvoid LLVMAddScalarReplAggregatesPassWithThreshold(LLVMPassManagerRef PM, 115227569Sphilip int Threshold); 116227569Sphilip 117227569Sphilip/** See llvm::createSimplifyLibCallsPass function. */ 118227569Sphilipvoid LLVMAddSimplifyLibCallsPass(LLVMPassManagerRef PM); 119227569Sphilip 120227569Sphilip/** See llvm::createTailCallEliminationPass function. */ 121227569Sphilipvoid LLVMAddTailCallEliminationPass(LLVMPassManagerRef PM); 122227569Sphilip 123227569Sphilip/** See llvm::createConstantPropagationPass function. */ 124227569Sphilipvoid LLVMAddConstantPropagationPass(LLVMPassManagerRef PM); 125227569Sphilip 126227569Sphilip/** See llvm::demotePromoteMemoryToRegisterPass function. */ 127227569Sphilipvoid LLVMAddDemoteMemoryToRegisterPass(LLVMPassManagerRef PM); 128227569Sphilip 129291436Sarybchik/** See llvm::createVerifierPass function. */ 130227569Sphilipvoid LLVMAddVerifierPass(LLVMPassManagerRef PM); 131227569Sphilip 132227569Sphilip/** See llvm::createCorrelatedValuePropagationPass function */ 133227569Sphilipvoid LLVMAddCorrelatedValuePropagationPass(LLVMPassManagerRef PM); 134227569Sphilip 135227569Sphilip/** See llvm::createEarlyCSEPass function */ 136291436Sarybchikvoid LLVMAddEarlyCSEPass(LLVMPassManagerRef PM); 137227569Sphilip 138227569Sphilip/** See llvm::createLowerExpectIntrinsicPass function */ 139227569Sphilipvoid LLVMAddLowerExpectIntrinsicPass(LLVMPassManagerRef PM); 140227569Sphilip 141227569Sphilip/** See llvm::createTypeBasedAliasAnalysisPass function */ 142227569Sphilipvoid LLVMAddTypeBasedAliasAnalysisPass(LLVMPassManagerRef PM); 143227569Sphilip 144227569Sphilip/** See llvm::createScopedNoAliasAAPass function */ 145291436Sarybchikvoid LLVMAddScopedNoAliasAAPass(LLVMPassManagerRef PM); 146227569Sphilip 147227569Sphilip/** See llvm::createBasicAliasAnalysisPass function */ 148227569Sphilipvoid LLVMAddBasicAliasAnalysisPass(LLVMPassManagerRef PM); 149227569Sphilip 150227569Sphilip/** 151227569Sphilip * @} 152283514Sarybchik */ 153283514Sarybchik 154283514Sarybchik#ifdef __cplusplus 155227569Sphilip} 156227569Sphilip#endif /* defined(__cplusplus) */ 157227569Sphilip 158227569Sphilip#endif 159227569Sphilip