TY - GEN
T1 - Goal-directed value Profiling
AU - Watterson, Scott
AU - Debray, Saumya
N1 - Publisher Copyright:
© Springer-Verlag Berlin Heidelberg 2001.
PY - 2001
Y1 - 2001
N2 - Compilers can exploit knowledge that a variable has a fixed known value at a program point for optimizations such as code specialization and constant folding. Recent work has shown that it is possible to take advantage of such optimizations, and thereby obtain significant performance improvements, even if a variable cannot be statically guaranteed to have a fixed constant value. To do this profitably, however, it is necessary to take into account information about the runtime distribution of values taken on by variables. This information can be obtained though value profiling. Unfortunately, existing approaches to value profiling incur high overheads, primarily because profiling is carried out without consideration for the way in which the resulting information will be used. In this paper, we describe an approach to reduce the cost of value profiling by making the value profiler aware of the utility of the value profiles being gathered. This allows our profiler to avoid wasting resources where the profile can be guaranteed to not be useful for optimization. This results in significant reductions in both the time and space requirements for value profiling. Our approach, implemented in the context of the alto link-time optimizer, is an order of magnitude faster, and uses about 5% of the space, of a straightforward implementation.
AB - Compilers can exploit knowledge that a variable has a fixed known value at a program point for optimizations such as code specialization and constant folding. Recent work has shown that it is possible to take advantage of such optimizations, and thereby obtain significant performance improvements, even if a variable cannot be statically guaranteed to have a fixed constant value. To do this profitably, however, it is necessary to take into account information about the runtime distribution of values taken on by variables. This information can be obtained though value profiling. Unfortunately, existing approaches to value profiling incur high overheads, primarily because profiling is carried out without consideration for the way in which the resulting information will be used. In this paper, we describe an approach to reduce the cost of value profiling by making the value profiler aware of the utility of the value profiles being gathered. This allows our profiler to avoid wasting resources where the profile can be guaranteed to not be useful for optimization. This results in significant reductions in both the time and space requirements for value profiling. Our approach, implemented in the context of the alto link-time optimizer, is an order of magnitude faster, and uses about 5% of the space, of a straightforward implementation.
UR - http://www.scopus.com/inward/record.url?scp=80053318427&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=80053318427&partnerID=8YFLogxK
U2 - 10.1007/3-540-45306-7_22
DO - 10.1007/3-540-45306-7_22
M3 - Conference contribution
AN - SCOPUS:80053318427
SN - 354041861X
SN - 9783540418610
T3 - Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
SP - 319
EP - 333
BT - Compiler Construction - 10th International Conference, CC 2001 Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2001, Proceedings
A2 - Wilhelm, Reinhard
PB - Springer-Verlag
T2 - 10th International Conference on Compiler Construction, CC 2001 Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2001
Y2 - 2 April 2001 through 6 April 2001
ER -