protected void compileAll() throws InterruptedException { executor.init(); universe.getMethods().stream() .filter(method -> method.isEntryPoint() || CompilationInfoSupport.singleton().isForcedCompilation(method)) .forEach(method -> ensureCompiled(method, new EntryPointReason())); universe.getMethods().stream() .map(method -> method.compilationInfo.getDeoptTargetMethod()) .filter(deoptTargetMethod -> deoptTargetMethod != null) .forEach(deoptTargetMethod -> ensureCompiled(deoptTargetMethod, new EntryPointReason())); executor.start(); executor.complete(); executor.shutdown(); }
@SuppressWarnings("try") public boolean doTypeflow() throws InterruptedException { boolean didSomeWork; try (StopTimer ignored = typeFlowTimer.start()) { executor.start(); executor.complete(); didSomeWork = (executor.getPostedOperations() > 0); executor.shutdown(); } /* Initialize for the next iteration. */ executor.init(timing); return didSomeWork; }
private void parseAll() throws InterruptedException { executor.init(); parseDeoptimizationTargetMethods(); parseAheadOfTimeCompiledMethods(); // calling start before marking methods for parsing summons evil daemons executor.start(); executor.complete(); executor.shutdown(); }
@SuppressWarnings("try") private void inlineTrivialMethods(DebugContext debug) throws InterruptedException { for (HostedMethod method : universe.getMethods()) { try (DebugContext.Scope s = debug.scope("InlineTrivial", method.compilationInfo.getGraph(), method, this)) { if (method.compilationInfo.getGraph() != null) { checkTrivial(method); } } catch (Throwable e) { throw debug.handle(e); } } int round = 0; do { inliningProgress = false; round++; try (Indent ignored = debug.logAndIndent("==== Trivial Inlining round %d\n", round)) { executor.init(); universe.getMethods().stream().filter(method -> method.compilationInfo.getGraph() != null).forEach(method -> executor.execute(new TrivialInlineTask(method))); universe.getMethods().stream().map(method -> method.compilationInfo.getDeoptTargetMethod()).filter(Objects::nonNull).forEach( deoptTargetMethod -> executor.execute(new TrivialInlineTask(deoptTargetMethod))); executor.start(); executor.complete(); executor.shutdown(); } } while (inliningProgress); }