Mercurial > hg > graal-compiler
comparison graal/GraalCompiler/src/com/sun/c1x/C1XCompilation.java @ 2616:3558ca7088c0
FrameState and Graphviz changes:
* removed popx, pushx methods from GraphBuilder
* FrameState subclass of Value
* added String shortName() to Node
* added GraphvizPrinter option to use short names
* small hack in GraphvizPrinter: omit FrameState->Local connections
* added GraalGraphviz to implicit classpatch (read from GRAAL env var)
author | Lukas Stadler <lukas.stadler@jku.at> |
---|---|
date | Mon, 09 May 2011 17:00:25 +0200 |
parents | bd235cb4375a |
children | c93adece95d2 |
comparison
equal
deleted
inserted
replaced
2615:5768534fd4e5 | 2616:3558ca7088c0 |
---|---|
23 | 23 |
24 package com.sun.c1x; | 24 package com.sun.c1x; |
25 | 25 |
26 import java.util.*; | 26 import java.util.*; |
27 | 27 |
28 import com.oracle.graal.graph.*; | |
28 import com.sun.c1x.alloc.*; | 29 import com.sun.c1x.alloc.*; |
29 import com.sun.c1x.asm.*; | 30 import com.sun.c1x.asm.*; |
30 import com.sun.c1x.gen.*; | 31 import com.sun.c1x.gen.*; |
31 import com.sun.c1x.gen.LIRGenerator.DeoptimizationStub; | 32 import com.sun.c1x.gen.LIRGenerator.DeoptimizationStub; |
32 import com.sun.c1x.graph.*; | 33 import com.sun.c1x.graph.*; |
54 public final RiRegisterConfig registerConfig; | 55 public final RiRegisterConfig registerConfig; |
55 public final CiStatistics stats; | 56 public final CiStatistics stats; |
56 public final CiAssumptions assumptions = new CiAssumptions(); | 57 public final CiAssumptions assumptions = new CiAssumptions(); |
57 public final FrameState placeholderState; | 58 public final FrameState placeholderState; |
58 | 59 |
60 public final Graph graph = new Graph(); | |
61 | |
59 private boolean hasExceptionHandlers; | 62 private boolean hasExceptionHandlers; |
60 private final C1XCompilation parent; | 63 private final C1XCompilation parent; |
61 | 64 |
62 /** | 65 /** |
63 * @see #setNotTypesafe() | 66 * @see #setNotTypesafe() |
92 this.target = compiler.target; | 95 this.target = compiler.target; |
93 this.runtime = compiler.runtime; | 96 this.runtime = compiler.runtime; |
94 this.method = method; | 97 this.method = method; |
95 this.stats = stats == null ? new CiStatistics() : stats; | 98 this.stats = stats == null ? new CiStatistics() : stats; |
96 this.registerConfig = method == null ? compiler.globalStubRegisterConfig : runtime.getRegisterConfig(method); | 99 this.registerConfig = method == null ? compiler.globalStubRegisterConfig : runtime.getRegisterConfig(method); |
97 this.placeholderState = method != null && method.minimalDebugInfo() ? new FrameState(0, 0, 0, 0) : null; | 100 this.placeholderState = method != null && method.minimalDebugInfo() ? new FrameState(0, 0, 0, 0, graph) : null; |
98 | 101 |
99 if (compiler.isObserved()) { | 102 if (compiler.isObserved()) { |
100 compiler.fireCompilationStarted(new CompilationEvent(this)); | 103 compiler.fireCompilationStarted(new CompilationEvent(this)); |
101 } | 104 } |
102 } | 105 } |
164 * @param osrBCI the OSR bytecode index; {@code -1} if this is not an OSR | 167 * @param osrBCI the OSR bytecode index; {@code -1} if this is not an OSR |
165 * @return the block map for the specified method | 168 * @return the block map for the specified method |
166 */ | 169 */ |
167 public BlockMap getBlockMap(RiMethod method) { | 170 public BlockMap getBlockMap(RiMethod method) { |
168 // PERF: cache the block map for methods that are compiled or inlined often | 171 // PERF: cache the block map for methods that are compiled or inlined often |
169 BlockMap map = new BlockMap(method, hir.numberOfBlocks(), hir.graph()); | 172 BlockMap map = new BlockMap(method, hir.numberOfBlocks(), graph); |
170 if (!map.build(C1XOptions.PhiLoopStores)) { | 173 if (!map.build(C1XOptions.PhiLoopStores)) { |
171 throw new CiBailout("build of BlockMap failed for " + method); | 174 throw new CiBailout("build of BlockMap failed for " + method); |
172 } else { | 175 } else { |
173 if (compiler.isObserved()) { | 176 if (compiler.isObserved()) { |
174 String label = CiUtil.format("BlockListBuilder %f %r %H.%n(%p)", method, true); | 177 String label = CiUtil.format("BlockListBuilder %f %r %H.%n(%p)", method, true); |