Abstract
Finding the best optimization sequence order that can improve the performance for even a simple program is not an easy task. However, the modern compilers provide dozens of optimizations, making it not a practical solution to try all the optimization sequences manually to find the optimal one. In this paper, genetic algorithm is proposed to select the best optimization sequence for a cluster of similar programs. However, wide set of programs are elected to cover as much as possible all the features. The set of the programs are classified into three clusters depending on them features. Thus, the genetic algorithm in this work is learning method. This means any new program, unseen program, can take the optimization sequence of the cluster that has similar features to it. Moreover, two scenarios are proposed using genetic algorithm to find the best optimization sequence for each cluster. In the first scenario, programs are classified into three clusters according to program dynamic features. The genetic algorithm with Tournament selection method is applied on each cluster independently to obtain a good optimization sequence for a cluster. Moreover, the proposed method improved the execution time on average by 77% compared with the O2. The second scenario was exactly similar to the first one. While, different selection methods are used for each cluster. The improved average execution time for this scenario was 78% compared with the O2. LLVM framework is used to validate and execute the proposed method. In addition, Bolybench, Standerford, Shootout benchmarks are used to verify the effectiveness of the proposed method.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Shouri, A.H., Bignoli, A., Palermo, G., Silvano, C., Kulkarni, S., Cavazos, J.: Mitigating the compiler phase-ordering problem using optimization sub-sequences and machine learning. ACM Trans. Archit. Code Optim. 14(3), 1–28 (2017)
De Lima, E.D., de Souza Xavier, T.C., da Silva, A.F., Ruiz, L.B.: Compiling for Performance and Power Efficiency (2013)
Cavazos, J., Fursin, G., Agakov, F., Bonilla, E., O’Boyle, M.F., Temam, O.: Rapidly Selecting Good Compiler Optimizations using Performance Counters (2007)
Alkaaby, Z.S., Alwan, E.H., Fanfakh, A.B.M.: Finding a good global sequence using multi-level genetic algorithm. J. Eng. Appl. Sci. 13(22), 9777–9783 (2018)
Cavazos, J.: Mitigating the compiler optimization phase-ordering problem using machine learning. ACM SIGPLAN Not. 47(10), 147–162 (2012)
Purini, S., Jain, L.: Finding good optimization sequences covering program space. ACM Trans. Archit. Code Opt. 9(4), 56 (2013)
Majumder, A., Ekbal, A., Naskar, S. K.: Feature Selection and Class-Weight Tuning Using Genetic Algorithm for Biomolecular Major Steps for Event Extraction (2017)
Trivedi, A., Srinivasan, D., Biswas, S., Reindl, T.: Hybridizing genetic algorithm with differential evolution for solving the unit commitment scheduling problem, Swarm Evol. Comput. 1–15 (2015)
Davidson, J.W., Tyson, G.S., Whalley, D.B., Kulkarni, P.A.: Evaluating Heuristic Optimization Phase Order Search Algorithms (2007)
Muslim, A.B., Ali, A.K.M.: The combination of genetic programming and genetic algorithm for neural networks design and training. J. Univ. Babylon 18(1–2), 350–359 (2011)
Lattner, C., Adve, V.: LLVM: A compilation framework for lifelong program analysis & transformation. In: Proceedings of the International Symposium on Code Generation and Optimization IEEE Computer Society (2004)
Pan, Z., Eigenmann, R.: Fast and effective orchestration of compiler optimizations for automatic performance tuning. In: Proceedings of the International Symposium on Code Generation and Optimization IEEE Computer Society, 319–332 (2006)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2020 Springer Nature Switzerland AG
About this paper
Cite this paper
Almohammed, M.H., Alwan, E.H., Fanfakh, A.B.M. (2020). Programs Features Clustering to Find Optimization Sequence Using Genetic Algorithm. In: Jain, L., Peng, SL., Alhadidi, B., Pal, S. (eds) Intelligent Computing Paradigm and Cutting-edge Technologies. ICICCT 2019. Learning and Analytics in Intelligent Systems, vol 9. Springer, Cham. https://doi.org/10.1007/978-3-030-38501-9_4
Download citation
DOI: https://doi.org/10.1007/978-3-030-38501-9_4
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-38500-2
Online ISBN: 978-3-030-38501-9
eBook Packages: Intelligent Technologies and RoboticsIntelligent Technologies and Robotics (R0)