diff options
| author | gingerBill <bill@gingerbill.org> | 2025-03-18 15:39:18 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2025-03-18 15:39:18 +0000 |
| commit | d209af50948d3ae78142fda77e5ee654257861a4 (patch) | |
| tree | 49810f17158bcbc92d7d54352a7e11e3094a5254 /src/llvm-c/Transforms | |
| parent | 0c70ec0330e1c22f80cced80905d946ddfd1afe1 (diff) | |
Update to LLVM 20.1.0
Diffstat (limited to 'src/llvm-c/Transforms')
| -rw-r--r-- | src/llvm-c/Transforms/PassBuilder.h | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/src/llvm-c/Transforms/PassBuilder.h b/src/llvm-c/Transforms/PassBuilder.h index 8ad2a9982..d297b57ca 100644 --- a/src/llvm-c/Transforms/PassBuilder.h +++ b/src/llvm-c/Transforms/PassBuilder.h @@ -14,9 +14,9 @@ #ifndef LLVM_C_TRANSFORMS_PASSBUILDER_H #define LLVM_C_TRANSFORMS_PASSBUILDER_H -#include "../Error.h" -#include "../TargetMachine.h" -#include "../Types.h" +#include "llvm-c/Error.h" +#include "llvm-c/TargetMachine.h" +#include "llvm-c/Types.h" /** * @defgroup LLVMCCoreNewPM New Pass Manager @@ -51,6 +51,16 @@ LLVMErrorRef LLVMRunPasses(LLVMModuleRef M, const char *Passes, LLVMPassBuilderOptionsRef Options); /** + * Construct and run a set of passes over a function. + * + * This function behaves the same as LLVMRunPasses, but operates on a single + * function instead of an entire module. + */ +LLVMErrorRef LLVMRunPassesOnFunction(LLVMValueRef F, const char *Passes, + LLVMTargetMachineRef TM, + LLVMPassBuilderOptionsRef Options); + +/** * Create a new set of options for a PassBuilder * * Ownership of the returned instance is given to the client, and they are @@ -72,6 +82,14 @@ void LLVMPassBuilderOptionsSetVerifyEach(LLVMPassBuilderOptionsRef Options, void LLVMPassBuilderOptionsSetDebugLogging(LLVMPassBuilderOptionsRef Options, LLVMBool DebugLogging); +/** + * Specify a custom alias analysis pipeline for the PassBuilder to be used + * instead of the default one. The string argument is not copied; the caller + * is responsible for ensuring it outlives the PassBuilderOptions instance. + */ +void LLVMPassBuilderOptionsSetAAPipeline(LLVMPassBuilderOptionsRef Options, + const char *AAPipeline); + void LLVMPassBuilderOptionsSetLoopInterleaving( LLVMPassBuilderOptionsRef Options, LLVMBool LoopInterleaving); |