TY - GEN
T1 - Optimizing expression selection for lookup table program transformation
AU - Wilcox, Chris
AU - Strout, Michelle Mills
AU - Bieman, James M.
PY - 2012
Y1 - 2012
N2 - Scientific programmers can speed up function evaluation by precomputing and storing function results in lookup table (LUTs), thereby replacing costly evaluation code with an inexpensive memory access. A code transform that replaces computation with LUT code can improve performance, however, accuracy is reduced because of error inherent in reconstructing values from LUT data. LUT transforms are commonly used to approximate expensive elementary functions. The current practice is for software developers to (1) manually identify expressions that can benefit from a LUT transform, (2) modify the code by hand to implement the LUT transform, and (3) run experiments to determine if the resulting error is within application requirements. This approach reduces productivity, obfuscates code, and limits programmer control over accuracy and performance. We propose source code analysis and program transformation to substantially automate the application of LUT transforms. Our approach uses a novel optimization algorithm that selects Pareto optimal sets of expressions that benefit most from LUT transformation, based on error and performance estimates. We demonstrate our methodology with the Mesa tool, which achieves speedups of 1.4-6.9x on scientific codes while managing introduced error. Our tool makes the programmer more productive and improves the chances of finding an effective solution.
AB - Scientific programmers can speed up function evaluation by precomputing and storing function results in lookup table (LUTs), thereby replacing costly evaluation code with an inexpensive memory access. A code transform that replaces computation with LUT code can improve performance, however, accuracy is reduced because of error inherent in reconstructing values from LUT data. LUT transforms are commonly used to approximate expensive elementary functions. The current practice is for software developers to (1) manually identify expressions that can benefit from a LUT transform, (2) modify the code by hand to implement the LUT transform, and (3) run experiments to determine if the resulting error is within application requirements. This approach reduces productivity, obfuscates code, and limits programmer control over accuracy and performance. We propose source code analysis and program transformation to substantially automate the application of LUT transforms. Our approach uses a novel optimization algorithm that selects Pareto optimal sets of expressions that benefit most from LUT transformation, based on error and performance estimates. We demonstrate our methodology with the Mesa tool, which achieves speedups of 1.4-6.9x on scientific codes while managing introduced error. Our tool makes the programmer more productive and improves the chances of finding an effective solution.
KW - code generation
KW - error analysis
KW - fuzzy reuse
KW - lookup table
KW - memoization
KW - Mesa tool
KW - performance optimization
KW - scientific computing
UR - http://www.scopus.com/inward/record.url?scp=84872325684&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=84872325684&partnerID=8YFLogxK
U2 - 10.1109/SCAM.2012.12
DO - 10.1109/SCAM.2012.12
M3 - Conference contribution
AN - SCOPUS:84872325684
SN - 9780769547831
T3 - Proceedings - 2012 IEEE 12th International Working Conference on Source Code Analysis and Manipulation, SCAM 2012
SP - 84
EP - 93
BT - Proceedings - 2012 IEEE 12th International Working Conference on Source Code Analysis and Manipulation, SCAM 2012
T2 - 2012 IEEE 12th International Working Conference on Source Code Analysis and Manipulation, SCAM 2012
Y2 - 23 September 2012 through 24 September 2012
ER -