C bindings for the new pass manager seem to allow to set any option from LLVMPassBuilderOptions, except InlinerThreshold. Allow to configure it as well.
Reviewed By: aeubanks
Differential Revision: https://reviews.llvm.org/D151832
void LLVMPassBuilderOptionsSetMergeFunctions(LLVMPassBuilderOptionsRef Options,
LLVMBool MergeFunctions);
+void LLVMPassBuilderOptionsSetInlinerThreshold(
+ LLVMPassBuilderOptionsRef Options, int Threshold);
+
/**
* Dispose of a heap-allocated PassBuilderOptions instance
*/
unwrap(Options)->PTO.MergeFunctions = MergeFunctions;
}
+void LLVMPassBuilderOptionsSetInlinerThreshold(
+ LLVMPassBuilderOptionsRef Options, int Threshold) {
+ unwrap(Options)->PTO.InlinerThreshold = Threshold;
+}
+
void LLVMDisposePassBuilderOptions(LLVMPassBuilderOptionsRef Options) {
delete unwrap(Options);
}