# HG changeset patch # User Doug Simon # Date 1401808450 -7200 # Node ID a831a16e52b4ee9ee018848d4e8b484e074c4a58 # Parent 76f40e11c82075aef5306af2adff651f44905a73# Parent dea42a47850e716c620e27ac49b01cd6692c5a10 Merge. diff -r 76f40e11c820 -r a831a16e52b4 graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/OptimizingLinearScanWalker.java --- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/OptimizingLinearScanWalker.java Tue Jun 03 17:13:52 2014 +0200 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/OptimizingLinearScanWalker.java Tue Jun 03 17:14:10 2014 +0200 @@ -74,31 +74,33 @@ void walk() { try (Scope s = Debug.scope("OptimizingLinearScanWalker")) { for (AbstractBlock block : allocator.sortedBlocks) { - int nextBlock = allocator.getFirstLirInstructionId(block); - try (Scope s1 = Debug.scope("LSRAOptimization")) { - Debug.log("next block: %s (%d)", block, nextBlock); - } - try (Indent indent0 = Debug.indent()) { - walkTo(nextBlock); - + if (block.getPredecessorCount() == 1) { + int nextBlock = allocator.getFirstLirInstructionId(block); try (Scope s1 = Debug.scope("LSRAOptimization")) { - boolean changed = true; - // we need to do this because the active lists might change - loop: while (changed) { - changed = false; - try (Indent indent1 = Debug.logAndIndent("Active intervals: (block %s [%d])", block, nextBlock)) { - for (Interval active = activeLists.get(RegisterBinding.Any); active != Interval.EndMarker; active = active.next) { - Debug.log("active (any): %s", active); - if (optimize(nextBlock, block, active, RegisterBinding.Any)) { - changed = true; - break loop; + Debug.log("next block: %s (%d)", block, nextBlock); + } + try (Indent indent0 = Debug.indent()) { + walkTo(nextBlock); + + try (Scope s1 = Debug.scope("LSRAOptimization")) { + boolean changed = true; + // we need to do this because the active lists might change + loop: while (changed) { + changed = false; + try (Indent indent1 = Debug.logAndIndent("Active intervals: (block %s [%d])", block, nextBlock)) { + for (Interval active = activeLists.get(RegisterBinding.Any); active != Interval.EndMarker; active = active.next) { + Debug.log("active (any): %s", active); + if (optimize(nextBlock, block, active, RegisterBinding.Any)) { + changed = true; + break loop; + } } - } - for (Interval active = activeLists.get(RegisterBinding.Stack); active != Interval.EndMarker; active = active.next) { - Debug.log("active (stack): %s", active); - if (optimize(nextBlock, block, active, RegisterBinding.Stack)) { - changed = true; - break loop; + for (Interval active = activeLists.get(RegisterBinding.Stack); active != Interval.EndMarker; active = active.next) { + Debug.log("active (stack): %s", active); + if (optimize(nextBlock, block, active, RegisterBinding.Stack)) { + changed = true; + break loop; + } } } } @@ -115,10 +117,8 @@ assert currentBlock != null : "block must not be null"; assert currentInterval != null : "interval must not be null"; - if (currentBlock.getPredecessorCount() != 1) { - // more than one predecessors -> optimization not possible - return false; - } + assert currentBlock.getPredecessorCount() == 1 : "more than one predecessors -> optimization not possible"; + if (!currentInterval.isSplitChild()) { // interval is not a split child -> no need for optimization return false; diff -r 76f40e11c820 -r a831a16e52b4 mxtool/mx.py --- a/mxtool/mx.py Tue Jun 03 17:13:52 2014 +0200 +++ b/mxtool/mx.py Tue Jun 03 17:14:10 2014 +0200 @@ -2651,11 +2651,10 @@ for line in f: line = line.strip() m = pattern.match(line) - if m is None: + p = project(m.group(1), fatalIfMissing=False) if m else None + if m is None or p is None: out.write(line + '\n') else: - p = project(m.group(1)) - for pkg in p.defined_java_packages(): if not pkg.startswith(p.name): abort('package in {0} does not have prefix matching project name: {1}'.format(p, pkg))