Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 7b1db1af238a
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: c7a37394716c
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Sep 29, 2014

  1. Ensure that closure cfg is built before running LVA on them.

    * We need to redo some of the dependency business, but for now,
      this does the trick.
    
    * Discovered by running rubyspecs with passes:
      OptimizeTempVarsPass,LocalOptimizationPass,DeadCodeElimination,LinearizeCFG
    subbuss committed Sep 29, 2014
    Copy the full SHA
    141e995 View commit details
  2. Fix default JIT passes in IRManager

    * Accidentally left behind in an older commit.
    subbuss committed Sep 29, 2014
    Copy the full SHA
    c7a3739 View commit details
Showing with 9 additions and 1 deletion.
  1. +1 −1 core/src/main/java/org/jruby/ir/IRManager.java
  2. +8 −0 core/src/main/java/org/jruby/ir/dataflow/DataFlowProblem.java
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/ir/IRManager.java
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@
public class IRManager {
public static String SAFE_COMPILER_PASSES = "LinearizeCFG";
public static String DEFAULT_COMPILER_PASSES = "OptimizeTempVarsPass,LocalOptimizationPass,LinearizeCFG";
public static String DEFAULT_JIT_PASSES = "AddLocalVarLoadStoreInstructions,AddCallProtocolInstructions,EnsureTempsAssigned,OptimizeTempVarsPass,LocalOptimizationPass,LinearizeCFG";
public static String DEFAULT_JIT_PASSES = "AddLocalVarLoadStoreInstructions,AddCallProtocolInstructions,EnsureTempsAssigned,LinearizeCFG";
public static String DEFAULT_INLINING_COMPILER_PASSES = "LocalOptimizationPass";

private int dummyMetaClassCount = 0;
8 changes: 8 additions & 0 deletions core/src/main/java/org/jruby/ir/dataflow/DataFlowProblem.java
Original file line number Diff line number Diff line change
@@ -137,6 +137,14 @@ private void buildFlowGraph() {
flowGraphNodes = new LinkedList<U>();
basicBlockToFlowGraph = new HashMap<BasicBlock, U>();

// SSS FIXME: We need to do more work on our dependency setup.
// Since LVA runs analyses on nested closures, and dependencies aren't
// checked on nested scopes, it can happen that for closures,
// the cfg hasn't been built yet.
if (scope.cfg() == null) {
scope.buildCFG();
}

for (BasicBlock bb: scope.cfg().getBasicBlocks()) {
U fgNode = buildFlowGraphNode(bb);
fgNode.init();