Mercurial > hg > truffle
comparison graal/GraalCompiler/src/com/sun/c1x/doc/LoopPeeling.txt @ 2509:16b9a8b5ad39
Renamings Runtime=>GraalRuntime and Compiler=>GraalCompiler
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Wed, 27 Apr 2011 11:50:44 +0200 |
parents | graal/Compiler/src/com/sun/c1x/doc/LoopPeeling.txt@9ec15d6914ca |
children |
comparison
equal
deleted
inserted
replaced
2508:fea94949e0a2 | 2509:16b9a8b5ad39 |
---|---|
1 Remaining Issues in the Loop Peeling optimization (September/18/09) | |
2 =================================================================== | |
3 | |
4 Known Problems: | |
5 Currently loop peeling is not working when the loop has exception | |
6 blocks. The algorithm has to be updated to handle these cases. | |
7 | |
8 Limitations: | |
9 The algorithm performs loop peeling only on innermost loops. However, | |
10 this is not a limitation. If one wants to peel the outermost loop(s), | |
11 after peeling the innermost loop, an additional pass is necessary | |
12 to update the blocks of the outermost loop, since after peeling | |
13 the innermost loop, newer blocks are added to the CFG. | |
14 | |
15 Current status as of 09/18/2009 | |
16 After running using hir configuration, with optimization level 3, the | |
17 following test cases produce wrong results: | |
18 (4 fails) | |
19 233: jtt/except/Catch_Loop01.java: (4) failed with unexpected com.sun.c1x.ci.CiBailout (expected -170) | |
20 234: jtt/except/Catch_Loop02.java: (4) failed with unexpected com.sun.c1x.ci.CiBailout (expected -170) | |
21 245: jtt/except/Catch_StackOverflowError_03.java: (0) failed with unexpected com.sun.c1x.ci.CiBailout (expected 0) | |
22 272: jtt/hotpath/HP_array04.java: (80) failed with unexpected java.lang.AssertionError (expected 15645) | |
23 | |
24 All of them are related the known problem aforementioned. | |
25 All the tests have the innermost loops peeled, and produce right results. | |
26 | |
27 Future Work: | |
28 1- Add more loop tests to jtt. New tests should run the loop 0, 1, 2 or more iterations. | |
29 | |
30 2- Peel loops with exception blocks. | |
31 | |
32 3- Currently, all innermost loops are peeled. Should we add logic to filter out some loops from loop peeling? | |
33 | |
34 4- Improve the way instructions are cloned. Now the algorithm visits the blocks in BFS order, which | |
35 might produce errors depending on the order the blocks are visited. | |
36 | |
37 5- After inserting new phi instructions at exit blocks, we need to iterate over the remaining CFG to update instructions | |
38 that may use the new phi. The way it's done now might me inefficient if the block has more than one exit node, since | |
39 we can iterate over the same block more than once. This needs to be improved. | |
40 | |
41 5- For performance reasons, improve the way loops are represented, for example, to use a bitmap to represent the loop blocks. | |
42 | |
43 |