forked from OSchip/llvm-project
[LLVM-C] Add bindings for addCoroutinePassesToExtensionPoints
Summary: This patch adds bindings to C and Go for addCoroutinePassesToExtensionPoints, which is used to add coroutine passes to the correct locations in PassManagerBuilder. Reviewers: whitequark, deadalnix Reviewed By: whitequark Subscribers: mehdi_amini, modocache, llvm-commits Differential Revision: https://reviews.llvm.org/D51642 llvm-svn: 343336
This commit is contained in:
parent
a5178f5369
commit
937afbc365
|
@ -66,3 +66,7 @@ func (pmb PassManagerBuilder) SetDisableSimplifyLibCalls(val bool) {
|
|||
func (pmb PassManagerBuilder) UseInlinerWithThreshold(threshold uint) {
|
||||
C.LLVMPassManagerBuilderUseInlinerWithThreshold(pmb.C, C.uint(threshold))
|
||||
}
|
||||
|
||||
func (pmb PassManagerBuilder) AddCoroutinePassesToExtensionPoints() {
|
||||
C.LLVMPassManagerBuilderAddCoroutinePassesToExtensionPoints(pmb.C);
|
||||
}
|
||||
|
|
|
@ -79,6 +79,9 @@ void LLVMPassManagerBuilderPopulateLTOPassManager(LLVMPassManagerBuilderRef PMB,
|
|||
LLVMBool Internalize,
|
||||
LLVMBool RunInliner);
|
||||
|
||||
/** See llvm::addCoroutinePassesToExtensionPoints. */
|
||||
void LLVMPassManagerBuilderAddCoroutinePassesToExtensionPoints(LLVMPassManagerBuilderRef PMB);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include "llvm/Support/CommandLine.h"
|
||||
#include "llvm/Support/ManagedStatic.h"
|
||||
#include "llvm/Transforms/AggressiveInstCombine/AggressiveInstCombine.h"
|
||||
#include "llvm/Transforms/Coroutines.h"
|
||||
#include "llvm/Transforms/IPO.h"
|
||||
#include "llvm/Transforms/IPO/ForceFunctionAttrs.h"
|
||||
#include "llvm/Transforms/IPO/FunctionAttrs.h"
|
||||
|
@ -1068,3 +1069,9 @@ void LLVMPassManagerBuilderPopulateLTOPassManager(LLVMPassManagerBuilderRef PMB,
|
|||
|
||||
Builder->populateLTOPassManager(*LPM);
|
||||
}
|
||||
|
||||
void
|
||||
LLVMPassManagerBuilderAddCoroutinePassesToExtensionPoints(LLVMPassManagerBuilderRef PMB) {
|
||||
PassManagerBuilder *Builder = unwrap(PMB);
|
||||
addCoroutinePassesToExtensionPoints(*Builder);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue