diff options
Diffstat (limited to 'include/llvm-c/Transforms')
-rw-r--r-- | include/llvm-c/Transforms/InstCombine.h | 43 | ||||
-rw-r--r-- | include/llvm-c/Transforms/Scalar.h | 12 | ||||
-rw-r--r-- | include/llvm-c/Transforms/Utils.h | 50 | ||||
-rw-r--r-- | include/llvm-c/Transforms/Vectorize.h | 3 |
4 files changed, 99 insertions, 9 deletions
diff --git a/include/llvm-c/Transforms/InstCombine.h b/include/llvm-c/Transforms/InstCombine.h new file mode 100644 index 000000000000..e1c1572d53dc --- /dev/null +++ b/include/llvm-c/Transforms/InstCombine.h @@ -0,0 +1,43 @@ +/*===-- Scalar.h - Scalar Transformation Library C Interface ----*- C++ -*-===*\ +|* *| +|* The LLVM Compiler Infrastructure *| +|* *| +|* This file is distributed under the University of Illinois Open Source *| +|* License. See LICENSE.TXT for details. *| +|* *| +|*===----------------------------------------------------------------------===*| +|* *| +|* This header declares the C interface to libLLVMInstCombine.a, which *| +|* combines instructions to form fewer, simple IR instructions. *| +|* *| +\*===----------------------------------------------------------------------===*/ + +#ifndef LLVM_C_TRANSFORMS_INSTCOMBINE_H +#define LLVM_C_TRANSFORMS_INSTCOMBINE_H + +#include "llvm-c/Types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @defgroup LLVMCTransformsInstCombine Instruction Combining transformations + * @ingroup LLVMCTransforms + * + * @{ + */ + +/** See llvm::createInstructionCombiningPass function. */ +void LLVMAddInstructionCombiningPass(LLVMPassManagerRef PM); + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif /* defined(__cplusplus) */ + +#endif + diff --git a/include/llvm-c/Transforms/Scalar.h b/include/llvm-c/Transforms/Scalar.h index 8991e0904849..f55cdce86be9 100644 --- a/include/llvm-c/Transforms/Scalar.h +++ b/include/llvm-c/Transforms/Scalar.h @@ -35,6 +35,9 @@ extern "C" { /** See llvm::createAggressiveDCEPass function. */ void LLVMAddAggressiveDCEPass(LLVMPassManagerRef PM); +/** See llvm::createAggressiveInstCombinerPass function. */ +void LLVMAddAggressiveInstCombinerPass(LLVMPassManagerRef PM); + /** See llvm::createBitTrackingDCEPass function. */ void LLVMAddBitTrackingDCEPass(LLVMPassManagerRef PM); @@ -86,6 +89,9 @@ void LLVMAddLoopRerollPass(LLVMPassManagerRef PM); /** See llvm::createLoopUnrollPass function. */ void LLVMAddLoopUnrollPass(LLVMPassManagerRef PM); +/** See llvm::createLoopUnrollAndJamPass function. */ +void LLVMAddLoopUnrollAndJamPass(LLVMPassManagerRef PM); + /** See llvm::createLoopUnswitchPass function. */ void LLVMAddLoopUnswitchPass(LLVMPassManagerRef PM); @@ -95,12 +101,6 @@ void LLVMAddMemCpyOptPass(LLVMPassManagerRef PM); /** See llvm::createPartiallyInlineLibCallsPass function. */ void LLVMAddPartiallyInlineLibCallsPass(LLVMPassManagerRef PM); -/** See llvm::createLowerSwitchPass function. */ -void LLVMAddLowerSwitchPass(LLVMPassManagerRef PM); - -/** See llvm::createPromoteMemoryToRegisterPass function. */ -void LLVMAddPromoteMemoryToRegisterPass(LLVMPassManagerRef PM); - /** See llvm::createReassociatePass function. */ void LLVMAddReassociatePass(LLVMPassManagerRef PM); diff --git a/include/llvm-c/Transforms/Utils.h b/include/llvm-c/Transforms/Utils.h new file mode 100644 index 000000000000..f171f7fbbe3e --- /dev/null +++ b/include/llvm-c/Transforms/Utils.h @@ -0,0 +1,50 @@ +/*===-- Utils.h - Transformation Utils Library C Interface ------*- C++ -*-===*\ +|* *| +|* The LLVM Compiler Infrastructure *| +|* *| +|* This file is distributed under the University of Illinois Open Source *| +|* License. See LICENSE.TXT for details. *| +|* *| +|*===----------------------------------------------------------------------===*| +|* *| +|* This header declares the C interface to libLLVMTransformUtils.a, which *| +|* implements various transformation utilities of the LLVM IR. *| +|* *| +|* Many exotic languages can interoperate with C code but have a harder time *| +|* with C++ due to name mangling. So in addition to C, this interface enables *| +|* tools written in such languages. *| +|* *| +\*===----------------------------------------------------------------------===*/ + +#ifndef LLVM_C_TRANSFORMS_UTILS_H +#define LLVM_C_TRANSFORMS_UTILS_H + +#include "llvm-c/Types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @defgroup LLVMCTransformsUtils Transformation Utilities + * @ingroup LLVMCTransforms + * + * @{ + */ + +/** See llvm::createLowerSwitchPass function. */ +void LLVMAddLowerSwitchPass(LLVMPassManagerRef PM); + +/** See llvm::createPromoteMemoryToRegisterPass function. */ +void LLVMAddPromoteMemoryToRegisterPass(LLVMPassManagerRef PM); + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif /* defined(__cplusplus) */ + +#endif + diff --git a/include/llvm-c/Transforms/Vectorize.h b/include/llvm-c/Transforms/Vectorize.h index cf8306aee762..e3f9961acfb1 100644 --- a/include/llvm-c/Transforms/Vectorize.h +++ b/include/llvm-c/Transforms/Vectorize.h @@ -33,9 +33,6 @@ extern "C" { * @{ */ -/** DEPRECATED - Use LLVMAddSLPVectorizePass */ -void LLVMAddBBVectorizePass(LLVMPassManagerRef PM); - /** See llvm::createLoopVectorizePass function. */ void LLVMAddLoopVectorizePass(LLVMPassManagerRef PM); |