[lit] Add argument check: --timeout must be non-negative integer
[llvm-core.git] / include / llvm-c / Transforms / IPO.h
blob51d007581283dfed5168366adab217428a248d3a
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 \*===----------------------------------------------------------------------===*/
15 #ifndef LLVM_C_TRANSFORMS_IPO_H
16 #define LLVM_C_TRANSFORMS_IPO_H
18 #include "llvm-c/Types.h"
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
24 /**
25 * @defgroup LLVMCTransformsIPO Interprocedural transformations
26 * @ingroup LLVMCTransforms
28 * @{
31 /** See llvm::createArgumentPromotionPass function. */
32 void LLVMAddArgumentPromotionPass(LLVMPassManagerRef PM);
34 /** See llvm::createConstantMergePass function. */
35 void LLVMAddConstantMergePass(LLVMPassManagerRef PM);
37 /** See llvm::createMergeFunctionsPass function. */
38 void LLVMAddMergeFunctionsPass(LLVMPassManagerRef PM);
40 /** See llvm::createCalledValuePropagationPass function. */
41 void LLVMAddCalledValuePropagationPass(LLVMPassManagerRef PM);
43 /** See llvm::createDeadArgEliminationPass function. */
44 void LLVMAddDeadArgEliminationPass(LLVMPassManagerRef PM);
46 /** See llvm::createFunctionAttrsPass function. */
47 void LLVMAddFunctionAttrsPass(LLVMPassManagerRef PM);
49 /** See llvm::createFunctionInliningPass function. */
50 void LLVMAddFunctionInliningPass(LLVMPassManagerRef PM);
52 /** See llvm::createAlwaysInlinerPass function. */
53 void LLVMAddAlwaysInlinerPass(LLVMPassManagerRef PM);
55 /** See llvm::createGlobalDCEPass function. */
56 void LLVMAddGlobalDCEPass(LLVMPassManagerRef PM);
58 /** See llvm::createGlobalOptimizerPass function. */
59 void LLVMAddGlobalOptimizerPass(LLVMPassManagerRef PM);
61 /** See llvm::createIPConstantPropagationPass function. */
62 void LLVMAddIPConstantPropagationPass(LLVMPassManagerRef PM);
64 /** See llvm::createPruneEHPass function. */
65 void LLVMAddPruneEHPass(LLVMPassManagerRef PM);
67 /** See llvm::createIPSCCPPass function. */
68 void LLVMAddIPSCCPPass(LLVMPassManagerRef PM);
70 /** See llvm::createInternalizePass function. */
71 void LLVMAddInternalizePass(LLVMPassManagerRef, unsigned AllButMain);
73 /**
74 * Create and add the internalize pass to the given pass manager with the
75 * provided preservation callback.
77 * The context parameter is forwarded to the callback on each invocation.
78 * As such, it is the responsibility of the caller to extend its lifetime
79 * until execution of this pass has finished.
81 * @see llvm::createInternalizePass function.
83 void LLVMAddInternalizePassWithMustPreservePredicate(
84 LLVMPassManagerRef PM,
85 void *Context,
86 LLVMBool (*MustPreserve)(LLVMValueRef, void *));
88 /** See llvm::createStripDeadPrototypesPass function. */
89 void LLVMAddStripDeadPrototypesPass(LLVMPassManagerRef PM);
91 /** See llvm::createStripSymbolsPass function. */
92 void LLVMAddStripSymbolsPass(LLVMPassManagerRef PM);
94 /**
95 * @}
98 #ifdef __cplusplus
100 #endif /* defined(__cplusplus) */
102 #endif