Mercurial > hg > truffle
comparison graal/GraalCompiler/src/com/sun/c1x/gen/PhiSimplifier.java @ 2866:7f14e6b48a9c
added dead code elimination
added ValueAnchor (temp workaround)
more inlining logic (now uses DCE)
IdealGraphPrinter: print even if Scheduler fails
added inlining and DCE tracing options to C1XOptions
author | Lukas Stadler <lukas.stadler@jku.at> |
---|---|
date | Tue, 07 Jun 2011 16:27:08 +0200 |
parents | 015be60afcf3 |
children |
comparison
equal
deleted
inserted
replaced
2845:e55543ff91fd | 2866:7f14e6b48a9c |
---|---|
21 * questions. | 21 * questions. |
22 */ | 22 */ |
23 package com.sun.c1x.gen; | 23 package com.sun.c1x.gen; |
24 | 24 |
25 import com.oracle.graal.graph.*; | 25 import com.oracle.graal.graph.*; |
26 import com.sun.c1x.graph.*; | |
27 import com.sun.c1x.ir.*; | 26 import com.sun.c1x.ir.*; |
28 | 27 |
29 /** | 28 /** |
30 * The {@code PhiSimplifier} class is a helper class that can reduce phi instructions. | 29 * The {@code PhiSimplifier} class is a helper class that can reduce phi instructions. |
31 */ | 30 */ |
32 public final class PhiSimplifier { | 31 public final class PhiSimplifier { |
33 | 32 |
34 private NodeBitMap visited; | 33 private NodeBitMap visited; |
35 private NodeBitMap cannotSimplify; | 34 private NodeBitMap cannotSimplify; |
36 | 35 |
37 public PhiSimplifier(IR ir) { | 36 public PhiSimplifier(Graph graph) { |
38 Graph graph = ir.compilation.graph; | |
39 visited = graph.createNodeBitMap(); | 37 visited = graph.createNodeBitMap(); |
40 cannotSimplify = graph.createNodeBitMap(); | 38 cannotSimplify = graph.createNodeBitMap(); |
41 | 39 |
42 for (Node n : graph.getNodes()) { | 40 for (Node n : graph.getNodes()) { |
43 if (n instanceof Phi) { | 41 if (n instanceof Phi) { |