Mercurial > hg > truffle
comparison graal/com.oracle.graal.lir/src/com/oracle/graal/lir/ControlFlowOptimizer.java @ 19228:6340d851894b
Don't make LowLevelPhase generic but only the apply() method.
author | Josef Eisl <josef.eisl@jku.at> |
---|---|
date | Mon, 09 Feb 2015 18:23:16 +0100 |
parents | 1e3b5204776f |
children | ae17c7a2f7b1 |
comparison
equal
deleted
inserted
replaced
19227:6e495e8cc407 | 19228:6340d851894b |
---|---|
33 import com.oracle.graal.lir.phases.*; | 33 import com.oracle.graal.lir.phases.*; |
34 | 34 |
35 /** | 35 /** |
36 * This class performs basic optimizations on the control flow graph after LIR generation. | 36 * This class performs basic optimizations on the control flow graph after LIR generation. |
37 */ | 37 */ |
38 public final class ControlFlowOptimizer<B extends AbstractBlock<B>> extends LowLevelLowTierPhase<B> { | 38 public final class ControlFlowOptimizer extends LowLevelLowTierPhase { |
39 | 39 |
40 /** | 40 /** |
41 * Performs control flow optimizations on the given LIR graph. | 41 * Performs control flow optimizations on the given LIR graph. |
42 */ | 42 */ |
43 @Override | 43 @Override |
44 protected void run(TargetDescription target, LIRGenerationResult lirGenRes, List<B> codeEmittingOrder, List<B> linearScanOrder) { | 44 protected <B extends AbstractBlock<B>> void run(TargetDescription target, LIRGenerationResult lirGenRes, List<B> codeEmittingOrder, List<B> linearScanOrder) { |
45 LIR lir = lirGenRes.getLIR(); | 45 LIR lir = lirGenRes.getLIR(); |
46 new Optimizer<B>(lir).deleteEmptyBlocks(codeEmittingOrder); | 46 new Optimizer<B>(lir).deleteEmptyBlocks(codeEmittingOrder); |
47 } | 47 } |
48 | 48 |
49 private static final class Optimizer<B extends AbstractBlock<B>> { | 49 private static final class Optimizer<B extends AbstractBlock<B>> { |