LLVM  16.0.0git
IPO.h
Go to the documentation of this file.
1 /*===-- IPO.h - Interprocedural Transformations C Interface -----*- C++ -*-===*\
2 |* *|
3 |* Part of the LLVM Project, under the Apache License v2.0 with LLVM *|
4 |* Exceptions. *|
5 |* See https://llvm.org/LICENSE.txt for license information. *|
6 |* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *|
7 |* *|
8 |*===----------------------------------------------------------------------===*|
9 |* *|
10 |* This header declares the C interface to libLLVMIPO.a, which implements *|
11 |* various interprocedural transformations of the LLVM IR. *|
12 |* *|
13 \*===----------------------------------------------------------------------===*/
14 
15 #ifndef LLVM_C_TRANSFORMS_IPO_H
16 #define LLVM_C_TRANSFORMS_IPO_H
17 
18 #include "llvm-c/ExternC.h"
19 #include "llvm-c/Types.h"
20 
22 
23 /**
24  * @defgroup LLVMCTransformsIPO Interprocedural transformations
25  * @ingroup LLVMCTransforms
26  *
27  * @{
28  */
29 
30 /** See llvm::createConstantMergePass function. */
32 
33 /** See llvm::createMergeFunctionsPass function. */
35 
36 /** See llvm::createCalledValuePropagationPass function. */
38 
39 /** See llvm::createDeadArgEliminationPass function. */
41 
42 /** See llvm::createFunctionAttrsPass function. */
44 
45 /** See llvm::createFunctionInliningPass function. */
47 
48 /** See llvm::createAlwaysInlinerPass function. */
50 
51 /** See llvm::createGlobalDCEPass function. */
53 
54 /** See llvm::createGlobalOptimizerPass function. */
56 
57 /** See llvm::createIPSCCPPass function. */
59 
60 /** See llvm::createInternalizePass function. */
61 void LLVMAddInternalizePass(LLVMPassManagerRef, unsigned AllButMain);
62 
63 /**
64  * Create and add the internalize pass to the given pass manager with the
65  * provided preservation callback.
66  *
67  * The context parameter is forwarded to the callback on each invocation.
68  * As such, it is the responsibility of the caller to extend its lifetime
69  * until execution of this pass has finished.
70  *
71  * @see llvm::createInternalizePass function.
72  */
75  void *Context,
76  LLVMBool (*MustPreserve)(LLVMValueRef, void *));
77 
78 /** See llvm::createStripDeadPrototypesPass function. */
80 
81 /** See llvm::createStripSymbolsPass function. */
83 
84 /**
85  * @}
86  */
87 
89 
90 #endif
LLVMAddFunctionInliningPass
void LLVMAddFunctionInliningPass(LLVMPassManagerRef PM)
See llvm::createFunctionInliningPass function.
Definition: IPO.cpp:82
LLVMAddInternalizePassWithMustPreservePredicate
void LLVMAddInternalizePassWithMustPreservePredicate(LLVMPassManagerRef PM, void *Context, LLVMBool(*MustPreserve)(LLVMValueRef, void *))
Create and add the internalize pass to the given pass manager with the provided preservation callback...
Definition: IPO.cpp:113
Types.h
Context
LLVMContext & Context
Definition: NVVMIntrRange.cpp:66
LLVMAddGlobalOptimizerPass
void LLVMAddGlobalOptimizerPass(LLVMPassManagerRef PM)
See llvm::createGlobalOptimizerPass function.
Definition: IPO.cpp:94
LLVMAddFunctionAttrsPass
void LLVMAddFunctionAttrsPass(LLVMPassManagerRef PM)
See llvm::createFunctionAttrsPass function.
Definition: IPO.cpp:78
LLVMAddDeadArgEliminationPass
void LLVMAddDeadArgEliminationPass(LLVMPassManagerRef PM)
See llvm::createDeadArgEliminationPass function.
Definition: IPO.cpp:74
LLVMAddGlobalDCEPass
void LLVMAddGlobalDCEPass(LLVMPassManagerRef PM)
See llvm::createGlobalDCEPass function.
Definition: IPO.cpp:90
LLVMAddAlwaysInlinerPass
void LLVMAddAlwaysInlinerPass(LLVMPassManagerRef PM)
See llvm::createAlwaysInlinerPass function.
Definition: IPO.cpp:86
LLVMAddMergeFunctionsPass
void LLVMAddMergeFunctionsPass(LLVMPassManagerRef PM)
See llvm::createMergeFunctionsPass function.
Definition: IPO.cpp:102
LLVMAddIPSCCPPass
void LLVMAddIPSCCPPass(LLVMPassManagerRef PM)
See llvm::createIPSCCPPass function.
Definition: IPO.cpp:98
LLVMAddStripDeadPrototypesPass
void LLVMAddStripDeadPrototypesPass(LLVMPassManagerRef PM)
See llvm::createStripDeadPrototypesPass function.
Definition: IPO.cpp:122
LLVMAddStripSymbolsPass
void LLVMAddStripSymbolsPass(LLVMPassManagerRef PM)
See llvm::createStripSymbolsPass function.
Definition: IPO.cpp:126
LLVMAddConstantMergePass
void LLVMAddConstantMergePass(LLVMPassManagerRef PM)
See llvm::createConstantMergePass function.
Definition: IPO.cpp:70
LLVMPassManagerRef
struct LLVMOpaquePassManager * LLVMPassManagerRef
Definition: Types.h:127
LLVM_C_EXTERN_C_END
#define LLVM_C_EXTERN_C_END
Definition: ExternC.h:36
LLVMBool
int LLVMBool
Definition: Types.h:28
LLVM_C_EXTERN_C_BEGIN
#define LLVM_C_EXTERN_C_BEGIN
Definition: ExternC.h:35
LLVMAddInternalizePass
void LLVMAddInternalizePass(LLVMPassManagerRef, unsigned AllButMain)
See llvm::createInternalizePass function.
Definition: IPO.cpp:106
LLVMValueRef
struct LLVMOpaqueValue * LLVMValueRef
Represents an individual value in LLVM IR.
Definition: Types.h:75
ExternC.h
LLVMAddCalledValuePropagationPass
void LLVMAddCalledValuePropagationPass(LLVMPassManagerRef PM)
See llvm::createCalledValuePropagationPass function.
Definition: IPO.cpp:66