Mercurial > hg > graal-compiler
comparison graal/GraalCompiler/src/com/sun/c1x/graph/IR.java @ 2564:274360f98f97
Remove inlining (2nd part) removed IRScope
author | Gilles Duboscq <gilles.duboscq@oracle.com> |
---|---|
date | Fri, 29 Apr 2011 13:19:17 +0200 |
parents | e1b3db8031ee |
children | 4a36a0bd6d18 |
comparison
equal
deleted
inserted
replaced
2563:491896f81cae | 2564:274360f98f97 |
---|---|
52 /** | 52 /** |
53 * The entry block for an OSR compile. | 53 * The entry block for an OSR compile. |
54 */ | 54 */ |
55 public BlockBegin osrEntryBlock; | 55 public BlockBegin osrEntryBlock; |
56 | 56 |
57 /** | 57 private int maxLocks; |
58 * The top IRScope. | |
59 */ | |
60 public IRScope topScope; | |
61 | 58 |
62 /** | 59 /** |
63 * The linear-scan ordered list of blocks. | 60 * The linear-scan ordered list of blocks. |
64 */ | 61 */ |
65 private List<BlockBegin> orderedBlocks; | 62 private List<BlockBegin> orderedBlocks; |
93 C1XTimers.HIR_OPTIMIZE.stop(); | 90 C1XTimers.HIR_OPTIMIZE.stop(); |
94 } | 91 } |
95 } | 92 } |
96 | 93 |
97 private void buildGraph() { | 94 private void buildGraph() { |
98 topScope = new IRScope(null, null, compilation.method, -1); | |
99 | |
100 // Graph builder must set the startBlock and the osrEntryBlock | 95 // Graph builder must set the startBlock and the osrEntryBlock |
101 new GraphBuilder(compilation, this).build(topScope); | 96 new GraphBuilder(compilation, this).build(); |
102 assert startBlock != null; | 97 assert startBlock != null; |
103 verifyAndPrint("After graph building"); | 98 verifyAndPrint("After graph building"); |
104 | 99 |
105 if (C1XOptions.PrintCompilation) { | 100 if (C1XOptions.PrintCompilation) { |
106 TTY.print(String.format("%3d blocks | ", this.numberOfBlocks())); | 101 TTY.print(String.format("%3d blocks | ", this.numberOfBlocks())); |
257 } | 252 } |
258 | 253 |
259 public int numLoops() { | 254 public int numLoops() { |
260 return compilation.stats.loopCount; | 255 return compilation.stats.loopCount; |
261 } | 256 } |
257 | |
258 /** | |
259 * Updates the maximum number of locks held at any one time. | |
260 * | |
261 * @param locks a lock count that will replace the current {@linkplain #maxLocks() max locks} if it is greater | |
262 */ | |
263 public void updateMaxLocks(int locks) { | |
264 if (locks > maxLocks) { | |
265 maxLocks = locks; | |
266 } | |
267 } | |
268 | |
269 /** | |
270 * Gets the number of locks | |
271 * @return the number of locks | |
272 */ | |
273 public final int maxLocks() { | |
274 return maxLocks; | |
275 } | |
262 } | 276 } |