blob: 6e0ff12c5f69f36845dddb0d7440420d702a7c91 [file] [log] [blame]
Gordon Henriksen47f20aa2008-03-16 16:32:40 +00001/*===-- 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/** See llvm::createConstantPropagationPass function. */
29void LLVMAddConstantPropagationPass(LLVMPassManagerRef PM);
30
31/** See llvm::createInstructionCombiningPass function. */
32void LLVMAddInstructionCombiningPass(LLVMPassManagerRef PM);
33
Gordon Henriksenc9da1012008-03-20 17:16:03 +000034/** See llvm::createPromoteMemoryToRegisterPass function. */
35void LLVMAddPromoteMemoryToRegisterPass(LLVMPassManagerRef PM);
36
37/** See llvm::demotePromoteMemoryToRegisterPass function. */
38void LLVMAddDemoteMemoryToRegisterPass(LLVMPassManagerRef PM);
39
Gordon Henriksen47f20aa2008-03-16 16:32:40 +000040/** See llvm::createReassociatePass function. */
41void LLVMAddReassociatePass(LLVMPassManagerRef PM);
42
43/** See llvm::createGVNPass function. */
44void LLVMAddGVNPass(LLVMPassManagerRef PM);
45
46/** See llvm::createCFGSimplificationPass function. */
47void LLVMAddCFGSimplificationPass(LLVMPassManagerRef PM);
48
49#ifdef __cplusplus
50}
51#endif /* defined(__cplusplus) */
52
53#endif