Inducing heuristics to decide whether to schedule

被引:16
作者
Cavazos, J [1 ]
Eliot, J [1 ]
Moss, B [1 ]
机构
[1] Univ Massachusetts, Dept Comp Sci, Amherst, MA 01003 USA
关键词
compiler optimization; machine learning; supervised learning; instruction scheduling; !text type='Java']Java[!/text; Jikes RVM;
D O I
10.1145/996893.996864
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Instruction scheduling is a compiler optimization that can improve program speed, sometimes by 10% or more-but it can also be expensive. Furthermore, time spent optimizing is more important in a Java just-in-time (JIT) compiler than in a traditional one because a JIT compiles code at run time, adding to the running time of the program. We found that, on any given block of code, instruction scheduling often does not produce significant benefit and sometimes degrades speed. Thus, we hoped that we could focus scheduling effort on those blocks that benefit from it. Using supervised learning we induced heuristics to predict which blocks benefit from scheduling. The induced function chooses, for each block, between list scheduling and not scheduling the block at all. Using the induced function we obtained over 90% of the improvement of scheduling every block but with less than 25% of the scheduling effort. When used in combination with profile-based adaptive optimization, the induced function remains effective but gives a smaller reduction in scheduling effort. Deciding when to optimize, and which optimization(s) to apply, is an important open problem area in compiler research. We show that supervised learning solves one of these problems well.
引用
收藏
页码:183 / 194
页数:12
相关论文
共 19 条
[1]  
[Anonymous], 1979, Computers and Intractablity: A Guide to the Theoryof NP-Completeness
[2]  
ARNOLD M., 2000, ACM SIGPLAN C OBJ OR
[3]  
ARNOLD M, 2001, SIGPLAN C PROGR LANG, P168
[4]   Evidence-based static branch prediction using machine learning [J].
Calder, B ;
Grunwald, D ;
Jones, M ;
Lindsay, D ;
Martin, J ;
Mozer, M ;
Zorn, B .
ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 1997, 19 (01) :188-222
[5]  
CHEKURI C, 1992, P 29 INT S MICR, P58
[6]  
Cohen W. W., 1995, FAST EFFECTIVE RULE
[7]  
COOPER KD, 1999, WORKSH LANG COMP TOO, P1
[8]  
ELLIS JR, 1985, THESIS YALE
[9]  
FISHER JA, 1981, IEEE T COMPUT, V30, P478, DOI 10.1109/TC.1981.1675827
[10]  
GIBBONS PB, 1986, SIGPLAN NOTICES, V21, P11, DOI 10.1145/13310.13312