Skip to main content

Programs Features Clustering to Find Optimization Sequence Using Genetic Algorithm

  • Conference paper
  • First Online:
Intelligent Computing Paradigm and Cutting-edge Technologies (ICICCT 2019)

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 169.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 219.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 219.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. 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)

    Google Scholar 

  2. De Lima, E.D., de Souza Xavier, T.C., da Silva, A.F., Ruiz, L.B.: Compiling for Performance and Power Efficiency (2013)

    Google Scholar 

  3. Cavazos, J., Fursin, G., Agakov, F., Bonilla, E., O’Boyle, M.F., Temam, O.: Rapidly Selecting Good Compiler Optimizations using Performance Counters (2007)

    Google Scholar 

  4. 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)

    Google Scholar 

  5. Cavazos, J.: Mitigating the compiler optimization phase-ordering problem using machine learning. ACM SIGPLAN Not. 47(10), 147–162 (2012)

    Article  Google Scholar 

  6. Purini, S., Jain, L.: Finding good optimization sequences covering program space. ACM Trans. Archit. Code Opt. 9(4), 56 (2013)

    Google Scholar 

  7. Majumder, A., Ekbal, A., Naskar, S. K.: Feature Selection and Class-Weight Tuning Using Genetic Algorithm for Biomolecular Major Steps for Event Extraction (2017)

    Google Scholar 

  8. 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)

    Google Scholar 

  9. Davidson, J.W., Tyson, G.S., Whalley, D.B., Kulkarni, P.A.: Evaluating Heuristic Optimization Phase Order Search Algorithms (2007)

    Google Scholar 

  10. 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)

    Google Scholar 

  11. 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)

    Google Scholar 

  12. 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)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Manal H. Almohammed .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2020 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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

Publish with us

Policies and ethics