/** Run any necessary passes to get the IR ready for compilation (AOT and/or JIT) */ public synchronized BasicBlock[] prepareForCompilation() { if (optimizedInterpreterContext != null && optimizedInterpreterContext.buildComplete()) { return optimizedInterpreterContext.getLinearizedBBList(); } // Don't run if same method was queued up in the tiny race for scheduling JIT/Full Build OR // for any nested closures which got a a fullInterpreterContext but have not run any passes // or generated instructions. if (fullInterpreterContext != null && fullInterpreterContext.buildComplete()) return fullInterpreterContext.getLinearizedBBList(); for (IRScope scope: getClosures()) { scope.prepareForCompilation(); } prepareFullBuildCommon(); runCompilerPasses(getManager().getJITPasses(this), dumpToIGV()); BasicBlock[] bbs = fullInterpreterContext.linearizeBasicBlocks(); return bbs; }
/** Run any necessary passes to get the IR ready for compilation (AOT and/or JIT) */ public synchronized BasicBlock[] prepareForCompilation() { if (optimizedInterpreterContext != null && optimizedInterpreterContext.buildComplete()) { return optimizedInterpreterContext.getLinearizedBBList(); } // Don't run if same method was queued up in the tiny race for scheduling JIT/Full Build OR // for any nested closures which got a a fullInterpreterContext but have not run any passes // or generated instructions. if (fullInterpreterContext != null && fullInterpreterContext.buildComplete()) return fullInterpreterContext.getLinearizedBBList(); for (IRScope scope: getClosures()) { scope.prepareForCompilation(); } prepareFullBuildCommon(); runCompilerPasses(getManager().getJITPasses(this), dumpToIGV()); BasicBlock[] bbs = fullInterpreterContext.linearizeBasicBlocks(); return bbs; }