Abstract
Evolving LLVM IR is widely applicable, with LLVM Clang offering support for an increasing range of computer hardware and programming languages. Local search mutations are used to hill climb industry C code released to support geographic open standards: Open Location Code (OLC) from Google and Uber’s Hexagonal Hierarchical Spatial Index (H3), giving up to two percent speed up on compiler optimised code.
Keywords
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
- 2.
https://github.com/google/open-location-code downloaded 4 August 2022.
- 3.
https://github.com/uber/h3 downloaded 3 August 2022.
- 4.
https://www.getthedata.com/downloads/open_postcode_geo.csv.zip dated 16 March 2022. The data are alphabetically sorted starting with AB1 0AA, which is in Aberdeen.
- 5.
Mutable conditional br instructions give rise to two mutations per line, Sect. 3.1.
- 6.
Our LLVM IR representation allows ready calculation of how many lines of LLVM IR are impacted, as an alternative to counting the number of mutations.
References
Petke, J., et al.: Genetic improvement of software: a comprehensive survey. IEEE TEVC 22(3), 415–432 (2018). https://doi.org/10.1109/TEVC.2017.2693219
Langdon, W.B., Harman, M.: Evolving a CUDA kernel from an nVidia template. In: Sobrevilla, P. (ed.) WCCI, pp. 2376–2383 (2010). https://doi.org/10.1109/CEC.2010.5585922
Harman, M., Jones, B.F.: Search based software engineering. Inf. Softw. Technol. 43(14), 833–839 (2001). https://doi.org/10.1016/S0950-5849(01)00189-6
Poli, R., Langdon, W.B., McPhee, N.F.: A field guide to genetic programming. Published via http://lulu.com and freely available at http://www.gp-field-guide.org.uk (2008). http://www.gp-field-guide.org.uk
Marginean, A., Barr, E.T., Harman, M., Jia, Y.: Automated transplantation of call graph and layout features into Kate. In: Barros, M., Labiche, Y. (eds.) SSBSE 2015. LNCS, vol. 9275, pp. 262–268. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-22183-0_21
Marginean, A.: Automated software transplantation. Ph.D. thesis, University College London (2021). https://discovery.ucl.ac.uk/id/eprint/10137954/1/Marginean_10137954_thesis_redacted.pdf
Langdon, W.B., Harman, M.: Optimising existing software with genetic programming. IEEE TEVC 19(1), 118–135 (2015). https://doi.org/10.1109/TEVC.2013.2281544
Weimer, W., Nguyen, T., Le Goues, C., Forrest, S.: Automatically finding patches using genetic programming. In: Fickas, S. (ed.) ICSE, pp. 364–374 (2009). https://doi.org/10.1109/ICSE.2009.5070536
Weimer, W., Forrest, S., Le Goues, C., Nguyen, T.: Automatic program repair with evolutionary computation. Commun. ACM 53(5), 109–116 (2010). https://doi.org/10.1145/1735223.1735249
Haraldsson, S.O., Woodward, J.R., Brownlee, A.E.I., Siggeirsdottir, K.: Fixing bugs in your sleep: how genetic improvement became an overnight success. In: Petke, J., White, D.R., Langdon, W.B., Weimer, W. (eds.) GI-2017, pp. 1513–1520 (2017). https://doi.org/10.1145/3067695.3082517
Le Goues, C., Pradel, M., Roychoudhury, A.: Automated program repair. Commun. ACM 62(12), 56–65 (2019). https://doi.org/10.1145/3318162
Monperrus, M.: Automatic software repair: a bibliography. ACM Comput. Surv. 51(1), Article no. 17 (2018). https://doi.org/10.1145/3105906
Alshahwan, N.: Industrial experience of genetic improvement in Facebook. In: Petke, J., Tan, S.H., Langdon, W.B., Weimer, W. (eds.) GI-2019, ICSE Workshops Proceedings, p. 1 (2019). https://doi.org/10.1109/GI.2019.00010
Harman, M.: Scaling genetic improvement and automated program repair. In: Kechagia, M., Tan, S.H., Mechtaev, S., Tan, L. (eds.) International Workshop on Automated Program Repair (APR 2022) (2022). https://doi.org/10.1145/3524459.3527353
Kirbas, S., et al.: On the introduction of automatic program repair in Bloomberg. IEEE Softw. 38(4), 43–51 (2021). https://doi.org/10.1109/MS.2021.3071086
Kechagia, M., Tan, S.H., Mechtaev, S., Tan, L. (eds.): 2022 IEEE/ACM International Workshop on Automated Program Repair (APR) (2022). https://ieeexplore.ieee.org/xpl/conhome/9474454/proceeding
Callan, J., Krauss, O., Petke, J., Sarro, F.: How do Android developers improve non-functional properties of software? Empr. Soft. Eng. 27, Article no. 113 (2022). https://doi.org/10.1007/s10664-022-10137-2
Langdon, W.B., Harman, M.: Genetically improved CUDA C++ software. In: Nicolau, M., et al. (eds.) EuroGP 2014. LNCS, vol. 8599, pp. 87–99. Springer, Heidelberg (2014). https://doi.org/10.1007/978-3-662-44303-3_8
Langdon, W.B., Modat, M., Petke, J., Harman, M.: Improving 3D medical image registration CUDA software with genetic programming. In: Igel, C., et al. (eds.) GECCO, pp. 951–958 (2014). https://doi.org/10.1145/2576768.2598244
Langdon, W.B., Harman, M.: Grow and graft a better CUDA pknotsRG for RNA pseudoknot free energy calculation. In: Langdon, W.B., Petke, J., White, D.R. (eds.) GI, pp. 805–810 (2015). https://doi.org/10.1145/2739482.2768418
Langdon, W.B., Lam, B.Y.H., Modat, M., Petke, J., Harman, M.: Genetic improvement of GPU software. Genet. Program Evolvable Mach. 18(1), 5–44 (2016). https://doi.org/10.1007/s10710-016-9273-9
Klus, P., et al.: BarraCUDA - a fast short read sequence aligner using graphics processing units. BMC Res. Notes 5(27) (2012). https://doi.org/10.1186/1756-0500-5-27
Langdon, W.B., Lam, B.Y.H.: Genetically improved BarraCUDA. BioData Min. 20(28) (2017). https://doi.org/10.1186/s13040-017-0149-1
Langdon, W.B., Lorenz, R.: Evolving AVX512 parallel C code using GP. In: Sekanina, L., Hu, T., Lourenço, N., Richter, H., García-Sánchez, P. (eds.) EuroGP 2019. LNCS, vol. 11451, pp. 245–261. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-16670-0_16
Lorenz, R., et al.: ViennaRNA package 2.0. Algorithms Mol. Biol. 6(1) (2011). https://doi.org/10.1186/1748-7188-6-26
Andrews, R.J., et al.: A map of the SARS-CoV-2 RNA structurome. NAR Genom. Bioinform. 3(2), lqab043 (2021). https://doi.org/10.1093/nargab/lqab043
Lewis, T.E., Magoulas, G.D.: TMBL kernels for CUDA GPUs compile faster using PTX. In: Harding, S., et al. (eds.) GECCO, pp. 455–462 (2011). https://doi.org/10.1145/2001858.2002033
Liou, J.Y., Forrest, S., Wu, C.-J.: Genetic improvement of GPU code. In: Petke, J., Tan, S.H., Langdon, W.B., Weimer, W. (eds.) GI-2019, ICSE Workshops Proceedings, pp. 20–27 (2019). https://doi.org/10.1109/GI.2019.00014
Liou, J.Y., Wang, X., Forrest, S., Wu, C.J.: GEVO: GPU code optimization using evolutionary computation. ACM Trans. Archit. Code Optim. 17(4), Article no. 33 (2020). https://doi.org/10.1145/3418055
Liou, J.Y., et al.: Understanding the power of evolutionary computation for GPU code optimization. arXiv (2022). https://doi.org/10.48550/ARXIV.2208.12350
Ryan, C., Collins, J.J., Neill, M.O.: Grammatical evolution: evolving programs for an arbitrary language. In: Banzhaf, W., Poli, R., Schoenauer, M., Fogarty, T.C. (eds.) EuroGP 1998. LNCS, vol. 1391, pp. 83–96. Springer, Heidelberg (1998). https://doi.org/10.1007/BFb0055930
Li, S.S., et al.: Genetic improvement in the Shackleton framework for optimizing LLVM pass sequences. In: Bruce, B.R., et al. (eds.) GECCO, pp. 1938–1939. Association for Computing Machinery (2022). https://doi.org/10.1145/3520304.3534000
Peeler, H., et al.: Optimizing LLVM pass sequences with Shackleton: a linear genetic programming framework. In: Trautmann, H., et al. (eds.) GECCO Comp, GECCO 2022, pp. 578–581. Association for Computing Machinery (2022). https://doi.org/10.1145/3520304.3528945
Peeler, H., et al.: Optimizing LLVM pass sequences with Shackleton: a linear genetic programming framework. arXiv (2022). https://arxiv.org/abs/2201.13305
Brameier, M., Banzhaf, W.: Linear Genetic Programming. No. XVI in Genetic and Evolutionary Computation (2007). https://doi.org/10.1007/978-0-387-31030-5
Petke, J., et al.: A survey of genetic improvement search spaces. In: Alexander, B., Haraldsson, S.O., Wagner, M., Woodward, J.R. (eds.) GECCO, pp. 1715–1721 (2019). https://doi.org/10.1145/3319619.3326870
Rainford, P., Porter, B.: Using phylogenetic analysis to enhance genetic improvement. In: Rahat, A., et al. (eds.) GECCO, GECCO 2022, pp. 849–857. Association for Computing Machinery (2022). https://doi.org/10.1145/3512290.3528789
Langdon, W.B.: Genetic improvement of genetic programming. In: Brownlee, A.S., Haraldsson, S.O., Petke, J., Woodward, J.R. (eds.) GI @ CEC 2020 Special Session (2020). https://doi.org/10.1109/CEC48606.2020.9185771
Papadakis, M., Jia, Y., Harman, M., Le Traon, Y.: Trivial compiler equivalence: a large scale empirical study of a simple fast and effective equivalent mutant detection technique. In: ICSE (2015). https://pages.cs.aueb.gr/~mpapad/papers/ICSE15B.pdf
Langdon, W.B., Petke, J., Bruce, B.R.: Optimising quantisation noise in energy measurement. In: Handl, J., Hart, E., Lewis, P.R., López-Ibáñez, M., Ochoa, G., Paechter, B. (eds.) PPSN 2016. LNCS, vol. 9921, pp. 249–259. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-45823-6_23
Blot, A., Petke, J.: Using genetic improvement to optimise optimisation algorithm implementations. In: Hadj-Hamou, K. (ed.) ROADEF 2022. INSA Lyon (2022). https://www.cs.ucl.ac.uk/staff/a.blot/files/blot_roadef_2022.pdf
Harman, M., Jia, Y., Langdon, W.B.: A manifesto for higher order mutation testing. In: du Bousquet, L., Bradbury, J., Fraser, G. (eds.) Mutation 2010, pp. 80–89 (2010). https://doi.org/10.1109/ICSTW.2010.13
Sitthi-amorn, P., Modly, N., Weimer, W., Lawrence, J.: Genetic programming for shader simplification. ACM Trans. Graph. 30(6), Article no. 152 (2011). https://doi.org/10.1145/2070781.2024186
Langdon, W.B., Veerapen, N., Ochoa, G.: Visualising the search landscape of the triangle program. In: McDermott, J., Castelli, M., Sekanina, L., Haasdijk, E., García-Sánchez, P. (eds.) EuroGP 2017. LNCS, vol. 10196, pp. 96–113. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-55696-3_7
Acknowledgements
We are grateful for help from H.Wierstorf (gnuplot) and F.Pfenning (\(\phi \) nodes). Funded by the Meta Oops project.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Langdon, W.B., Al-Subaihin, A., Blot, A., Clark, D. (2023). Genetic Improvement of LLVM Intermediate Representation. In: Pappa, G., Giacobini, M., Vasicek, Z. (eds) Genetic Programming. EuroGP 2023. Lecture Notes in Computer Science, vol 13986. Springer, Cham. https://doi.org/10.1007/978-3-031-29573-7_16
Download citation
DOI: https://doi.org/10.1007/978-3-031-29573-7_16
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-29572-0
Online ISBN: 978-3-031-29573-7
eBook Packages: Computer ScienceComputer Science (R0)