LLVM API Documentation
00001 /*===-- Scalar.h - Scalar Transformation Library C Interface ----*- C++ -*-===*\ 00002 |* *| 00003 |* The LLVM Compiler Infrastructure *| 00004 |* *| 00005 |* This file is distributed under the University of Illinois Open Source *| 00006 |* License. See LICENSE.TXT for details. *| 00007 |* *| 00008 |*===----------------------------------------------------------------------===*| 00009 |* *| 00010 |* This header declares the C interface to libLLVMScalarOpts.a, which *| 00011 |* implements various scalar transformations of the LLVM IR. *| 00012 |* *| 00013 |* Many exotic languages can interoperate with C code but have a harder time *| 00014 |* with C++ due to name mangling. So in addition to C, this interface enables *| 00015 |* tools written in such languages. *| 00016 |* *| 00017 \*===----------------------------------------------------------------------===*/ 00018 00019 #ifndef LLVM_C_TRANSFORMS_SCALAR_H 00020 #define LLVM_C_TRANSFORMS_SCALAR_H 00021 00022 #include "llvm-c/Core.h" 00023 00024 #ifdef __cplusplus 00025 extern "C" { 00026 #endif 00027 00028 /** See llvm::createConstantPropagationPass function. */ 00029 void LLVMAddConstantPropagationPass(LLVMPassManagerRef PM); 00030 00031 /** See llvm::createInstructionCombiningPass function. */ 00032 void LLVMAddInstructionCombiningPass(LLVMPassManagerRef PM); 00033 00034 /** See llvm::createPromoteMemoryToRegisterPass function. */ 00035 void LLVMAddPromoteMemoryToRegisterPass(LLVMPassManagerRef PM); 00036 00037 /** See llvm::demotePromoteMemoryToRegisterPass function. */ 00038 void LLVMAddDemoteMemoryToRegisterPass(LLVMPassManagerRef PM); 00039 00040 /** See llvm::createReassociatePass function. */ 00041 void LLVMAddReassociatePass(LLVMPassManagerRef PM); 00042 00043 /** See llvm::createGVNPass function. */ 00044 void LLVMAddGVNPass(LLVMPassManagerRef PM); 00045 00046 /** See llvm::createCFGSimplificationPass function. */ 00047 void LLVMAddCFGSimplificationPass(LLVMPassManagerRef PM); 00048 00049 #ifdef __cplusplus 00050 } 00051 #endif /* defined(__cplusplus) */ 00052 00053 #endif