Abstract
Modern compilers apply various code transformation algorithms to improve the quality of the target code. However, a complex problem is to determine which transformation algorithms must be utilized. This is difficult because of three reasons: a number of transformation algorithms, various combination possibilities, and several configuration possibilities. Over the last few years, various intelligent systems were presented in the literature. The goal of these systems is to search for transformation algorithms and thus apply them to a certain program. This paper proposes a flexible, low-cost and intelligent system capable of identifying transformation algorithms for an input program, considering the program’s specific features. This system is flexible for parameterization selection and has a low-computational cost. In addition, it has the capability to maximize the exploration of available computational resources. The system was implemented under the Low Level Virtual Machine infrastructure and the results indicate that it is capable of exceeding, up to 21.36%, performance reached by other systems. In addition, it achieved an average improvement of up to 17.72% over the most aggressive compiler optimization level of the Low Level Virtual Machine infrastructure.
Similar content being viewed by others
Explore related subjects
Discover the latest articles, news and stories from top researchers in related subjects.References
Ula M, Mursyidah, Hendriana Y, Hardi R. An expert system for early diagnose of vitamins and minerals deficiency on the body. In Proc. the International Conference on Information Technology Systems and Innovation, Oct. 2016.
Muntean M V, Donea A. A hybrid intelligent agent based expert system for GPS databases. In Proc. the 8th International Conference on Electronics, Computers and Artificial Intelligence, June 30-July 2, 2016.
Nascimento R J O, Fonseca C A G, Medeiros Neto F D. Using expert systems for investigating the impact of architectural anomalies on software reuse. IEEE Latin America Transactions, 2017, 15(2): 374-379.
Tartara M, Reghizzi S C. Continuous learning of compiler heuristics. ACM Transactions on Architecture and Code Optimization, 2013, 9(4): 46:1-46:25.
Aho A V, Sethi R, Ullman J D. Compilers: Principles, Techniques and Tools. Prentice Hall, 2006.
Cooper K, Torczon L. Engineering a Compiler (2nd edition). Morgan Kaufmann, USA, 2011.
Muchnick S S. Advanced Compiler Design and Implementation. Morgan Kaufmann Publishers Inc., San Francisco, CA, USA, 1997.
Pan Z, Eigenmann R. Fast and effective orchestration of compiler optimizations for automatic performance tuning. In Proc. the International Symposium on Code Generation and Optimization, March 2006, pp.319-332.
Park E, Kulkarni S, Cavazos J. An evaluation of different modeling techniques for iterative compilation. In Proc. the 14th International Conference on Compilers, Architectures and Synthesis for Embedded Systems, Oct. 2011, pp.65-74.
Purini S, Jain L. Finding good optimization sequences covering program space. ACM Transactions on Architecture and Code Optimization, 2013, 9(4): 56:1-56:23.
Cavazos J, Fursin G, Agakov F, Bonilla E, O’Boyle M F P, Temam O. Rapidly selecting good compiler optimizations using performance counters. In Proc. the International Symposium on Code Generation and Optimization, March 2007, pp.185-197.
Lima E D, Souza Xavier T C, Silva A F, Ruiz L B. Compiling for performance and power efficiency. In Proc. the 23rd International Workshop on Power and Timing Modeling, Optimization and Simulation., Sept. 2013, pp.142-149.
Queiroz Junior N L, Silva A F. Finding good compiler optimization sets — A case-based reasoning approach. In Proc. the 17th International Conference on Enterprise Information Systems, Apr. 2015, pp.504-515.
Lattner C, Adve V. LLVM: A compilation framework for lifelong program analysis & transformation. In Proc. the International Symposium on Code Generation and Optimization, Mar. 2004, pp.75-86.
Martins L G A, Nobre R, Cardoso J M P, Delbem A C B, Marques E. Clustering-based selection for the exploration of compiler optimization sequences. ACM Transactions on Architecture and Code Optimization, 2016, 13(1): 8:1-8:28.
Namolaru M, Cohen A, Fursin G, Zaks A, Freund A. Practical aggregation of semantical program properties for machine learning based optimization. In Proc. the International Conference on Compilers Architectures and Synthesis for Embedded Systems, Oct. 2010, pp.197-206.
Sanches A, Cardoso J M P. On identifying patterns in code repositories to assist the generation of hardware templates. In Proc. the International Conference on Field Programmable Logic and Applications, Aug.31-Sept.21, 2010, pp.267-270.
Wu Y, Larus J R. Static branch frequency and program profile analysis. In Proc. the International Symposium on Microarchitecture, Nov.30-Dec.2, 1994.
Ball T, Larus J R. Branch prediction for free. ACM SIGPLAN Notices, 1993, 28(6): 300-313.
Shafer G. A Mathematical Theory of Evidence. Princeton University Press, 1976.
Scholkopf B, Smola A J. Learning with Kernels — Support Vector Machines, Regularization, Optimization, and Beyond. MIT Press, San Francisco, CA, USA, 2002.
Needleman S B, Wunsch C D. A general method applicable to the search for similarities in the amino acid sequence of two proteins. Journal of Molecular Biology, 1970, 48(3): 443-453.
Tanenbaum A S, Goodman J R. Structured Computer Organization. Prentice Hall PTR, Upper Saddle River, NJ, USA, 1998.
Patterson D A, Hennessy J L. Computer Organization and Design: The Hardware/Software Interface (5th edition). Morgan Kaufmann Publishers Inc., San Francisco, CA, USA, 2013.
Chen Y, Fang S, Eeckhout L, Temam O, Wu C. Iterative optimization for the data center. ACM SIGPLAN Notices, 2012, 47(4): 49-60.
Pedregosa F, Varoquaux G, Gramfort A, Michel V, Thirion B, Grisel O, Blondel M, Prettenhofer P, Weiss R, Dubourg V, VanderPlas J, Passos A, Cournapeau D, Brucher M, Perrot M, Duchesnay E. Scikit-learn: Machine learning in Python. Journal of Machine Learning Research, 2011, 12: 2825-2830.
Kulkarni P A, Whalley D B, Tyson G S, Davidson J W. Practical exhaustive optimization phase order exploration and evaluation. ACM Transactions on Architecture and Code Optimization, 2009, 6(1): 1-36.
Foleiss J H, Silva A F, Ruiz L B. An experimental evaluation of compiler optimizations on code size. In Proc. the 15th Brazilian Symposium on Programming Languages, Sept. 2011.
Haneda M, Knijnenburg P M W, Wijshoff H A G. Generating new general compiler optimization settings. In Proc. the Annual International Conference on Supercomputing, June 2005, pp.161-168.
Long S, Fursin G. A heuristic search algorithm based on unified transformation framework. In Proc. the International Conference Workshops on Parallel Processing, June 2005, pp.137-144.
Cooper K D, Grosul A, Harvey T J, Reeves S, Subramanian D, Torczon L, Waterman T. Exploring the structure of the space of compilation sequences using randomized search algorithms. Journal of Supercomputing, 2006, 36(2): 135-151.
Kulkarni P A, Hines S R, Whalley D B, Hiser J D, Davidson J W, Jones D L. Fast and efficient searches for effective optimization-phase sequences. ACM Transactions on Architecture and Code Optimization, 2005, 2(2): 165-198.
Che Y, Wang Z. A lightweight iterative compilation approach for optimization parameter selection. In Proc. the 1st International Multi-Symposiums on Computer and Computational Sciences, Volume 1, June 2006, pp.318-325.
Zhou Y Q, Lin N W. A study on optimizing execution time and code size in iterative compilation. In Proc. the International Conference on Innovations in Bio-Inspired Computing and Applications, Sept. 2012, pp.104-109.
Cohen A, Sigler M, Girbal S, Temam O, Parello D, Vasilache N. Facilitating the search for compositions of program transformations. In Proc. the 19th International Conference on Supercomputing, June 2005, pp.151-160.
Pouchet L N, Bastoul C, Cohen A, Vasilache N. Iterative optimization in the polyhedral model: Part I, one-dimensional time. In Proc. the International Symposium on Code Generation and Optimization, March 2007, pp.144-156.
Pouchet L N, Bastoul C, Cohen A, Cavazos J. Iterative optimization in the polyhedral mode: Part II, multidimensional time. In Proc. the ACM SIGPLAN Conference on Programming Language Design and Implementation, June 2008, pp.90-100.
Cui H, Xue J, Wang L, Yang Y, Feng X, Fan D. Extendable pattern-oriented optimization directives. ACM Transaction on Architecture and Code Optimization, Sept. 2012, 9(3): Article No. 14.
Long S, O’Boyle M. Adaptive Java optimisation using instance-based learning. In Proc. the 18th International Conference on Supercomputing, June 26-July 1, 2004, pp.237-246.
Agakov F, Bonilla E, Cavazos J, Franke B, Fursin G, O’Boyle M F P, Thomson J, Toussaint M, Williams C K I. Using machine learning to focus iterative optimization. In Proc. the International Symposium on Code Generation and Optimization, March 2006, pp.295-305.
Park E, Cavazos J, Alvarez M A. Using graph-based program characterization for predictive modeling. In Proc. the International Symposium on Code Generation and Optimization, March 2012, pp.196-206.
Martins L G, Nobre R, Delbem A C, Marques E, Cardoso J M P. Exploration of compiler optimization sequences using clustering-based selection. ACM SIGPLAN Notices, 2014, 49(5): 63-72.
Acknowledgments
We thank CNPq (National Council for Scientific and Technological Development) of Brazil for the financial support towards this study.
Author information
Authors and Affiliations
Corresponding author
Electronic supplementary material
Below is the link to the electronic supplementary material.
ESM 1
(PDF 128 kb)
Rights and permissions
About this article
Cite this article
Filho, J.F., Rodriguez, L.G.A. & da Silva, A.F. Yet Another Intelligent Code-Generating System: A Flexible and Low-Cost Solution. J. Comput. Sci. Technol. 33, 940–965 (2018). https://doi.org/10.1007/s11390-018-1867-7
Received:
Revised:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11390-018-1867-7