Abstract
The efficiency of a software piece is a key factor for many systems. Real-time programs, critical software, device drivers, kernel OS functions and many other software pieces which are executed thousands or even millions of times per day require a very efficient execution. How this software is built can significantly affect the run time for these programs, since the context is that of compile-once/run-many. In this sense, the optimization flags used during the compilation time are a crucial element for this goal and they could make a big difference in the final execution time. In this paper, we use parallel metaheuristic techniques to automatically decide which optimization flags should be activated during the compilation on a set of benchmarking programs. The using the appropriate flag configuration is a complex combinatorial problem, but our approach is able to adapt the flag tuning to the characteristics of the software, improving the final run times with respect to other spread practices.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
In GCC, you can activate flag with -fflag but you can also deactivate it with -fno-flag if another option (O3 in our case) has previously activate it.
References
Software engineering software product quality requirements and evaluation (SQuaRE) Software product quality and system quality in use models. Standard, International Organization for Standardization, Geneva, CH (2011)
Hassan, M.M., Afzal, W., Lindström, B., Shah, S.M.A., Andler, S.F., Blom, M.: Testability and software performance: a systematic mapping study. In: Proceedings of the 31st Annual ACM Symposium on Applied Computing, pp. 1566–1569. ACM (2016)
Stallman, R.M.: GCC DeveloperCommunity: Using the GNU Compiler Collection: A GNU Manual for GCC Version 4.3. 3. CreateSpace, Paramount (2009)
Nobre, R., Reis, L., Cardoso, J.: Compiler phase ordering as an orthogonal approach for reducing energy consumption. In: Proceedings of the 19th Workshop on Compilers for Parallel Computing (CPC16) (2016)
Machado, R.S., Almeida, R.B., Jardim, A.D., Pernas, A.M., Yamin, A.C., Cavalheiro, G.G.H.: Comparing erformance of C compilers optimizations on different multicore architectures. In: Computer Architecture and High Performance Computing Workshops (SBAC-PADW), pp. 25–30. IEEE (2017)
Hoste, K., Eeckhout, L.: Cole: Compiler optimization level exploration. In: Proceedings of the 6th Annual IEEE/ACM International Symposium on Code Generation and Optimization, CGO 2008, pp. 165–174. ACM, New York (2008)
Zhong, S., Shen, Y., Hao, F.: Tuning compiler optimization options via simulated annealing. In: Second International Conference on Future Information Technology and Management Engineering, FITME 2009, pp. 305–308. IEEE (2009)
Kumar, T.S., Sakthivel, S., Kumar, S.: Optimizing code by selecting compiler flags using parallel GA on multicore CPUs. Int. J. Eng. Technol. 6, 544–551 (2014)
Mladenovic, N., Hansen, P.: Variable neighborhood search. Comput. Oper. Res. 24(11), 1097–1100 (1997)
Alba, E.: Parallel Metaheuristics: A New Class of Algorithms. Wiley, New York (2005)
Crainic, T.G., Toulouse, M.: Parallel meta-heuristics. In: Handbook of Metaheuristics, pp. 497–541. Springer, Heidelberg (2010)
Fulgham, B., Gouy, I.: The computer language benchmarks game. http://shootout.alioth.debian.org (2012)
Pereira, R., Couto, M., Ribeiro, F., Rua, R., Cunha, J., Fernandes, J.P., Saraiva, J.: Energy efficiency across programming languages: how do energy, time, and memory relate? In: Proceedings of the 10th ACM SIGPLAN International Conference on Software Language Engineering, SLE 2017, pp. 256–267. ACM, New York (2017)
Acknowledgement
This research has been partially funded by the Spanish MINECO and FEDER projects (TIN2014-57341-R (http://moveon.lcc.uma.es), TIN2016-81766-REDT (http://cirti.es), and TIN2017-88213-R (http://6city.lcc.uma.es).
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2018 Springer Nature Switzerland AG
About this paper
Cite this paper
Luque, G., Alba, E. (2018). Finding Best Compiler Options for Critical Software Using Parallel Algorithms. In: Del Ser, J., Osaba, E., Bilbao, M., Sanchez-Medina, J., Vecchio, M., Yang, XS. (eds) Intelligent Distributed Computing XII. IDC 2018. Studies in Computational Intelligence, vol 798. Springer, Cham. https://doi.org/10.1007/978-3-319-99626-4_7
Download citation
DOI: https://doi.org/10.1007/978-3-319-99626-4_7
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-99625-7
Online ISBN: 978-3-319-99626-4
eBook Packages: EngineeringEngineering (R0)