use of org.robovm.llvm.PassManagerBuilder in project robovm by robovm.
the class ClassCompiler method createPassManager.
private static PassManager createPassManager(Config config) {
PassManager passManager = new PassManager();
if (config.isDebug()) {
// Minimal passes. Just inline functions marked 'alwaysinline'.
passManager.addAlwaysInlinerPass();
} else {
try (PassManagerBuilder builder = new PassManagerBuilder()) {
builder.setSetOptLevel(2);
builder.setDisableTailCalls(true);
builder.useAlwaysInliner(true);
builder.populateModulePassManager(passManager);
}
}
return passManager;
}
Aggregations