Search in sources :

Example 1 with PassManagerBuilder

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;
}
Also used : PassManager(org.robovm.llvm.PassManager) PassManagerBuilder(org.robovm.llvm.PassManagerBuilder)

Aggregations

PassManager (org.robovm.llvm.PassManager)1 PassManagerBuilder (org.robovm.llvm.PassManagerBuilder)1