Skip to content

Commit

Permalink
Try to sort out compiler passes for various JIT thresholds
Browse files Browse the repository at this point in the history
  • Loading branch information
headius committed Oct 7, 2014
1 parent cb74489 commit 5dda245
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
19 changes: 0 additions & 19 deletions core/src/main/java/org/jruby/ir/IRScope.java
Expand Up @@ -640,25 +640,6 @@ public synchronized List<BasicBlock> prepareForCompilation() {
// Reset linearization, since we will add JIT-specific flow and instrs
resetLinearizationData();

// Build CFG and run compiler passes, if necessary
if (getCFG() == null) {
buildCFG();
}

// Add this always since we dont re-JIT a previously
// JIT-ted closure. But, check if there are other
// smarts available to us and eliminate adding this
// code to every closure there is.
//
// Add a global ensure block to catch uncaught breaks
// and throw a LocalJumpError.
if (this instanceof IRClosure) {
if (((IRClosure)this).addGEBForUncaughtBreaks()) {
resetState();
computeScopeFlags();
}
}

runCompilerPasses(getManager().getJITPasses(this));

checkRelinearization();
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/ir/targets/JVMVisitor.java
Expand Up @@ -143,9 +143,9 @@ private void logScope(IRScope scope) {
public void emitScope(IRScope scope, String name, Signature signature) {
List <BasicBlock> bbs;
if (prepare) {
scope.prepareForInterpretation(false);
bbs = scope.prepareForCompilation();
} else {
scope.prepareForInterpretation(false);
bbs = scope.buildLinearization();
}
Map <BasicBlock, Label> exceptionTable = scope.buildJVMExceptionTable();
Expand Down

0 comments on commit 5dda245

Please sign in to comment.