Please use this identifier to cite or link to this item: https://www.um.edu.mt/library/oar/handle/123456789/65391
Title: A machine learning framework for code optimisations
Authors: Abela, Brandon
Keywords: Machine learning
Compilers (Computer programs)
Genetic algorithms
Issue Date: 2019
Citation: Abela, B. (2019). A machine learning framework for code optimisations (Bachelor's dissertation).
Abstract: Traditional compilers take programs written in a high level programming language and transforms them into semantically equivalent machine code. Along this transformation pipeline, the code optimisation stage carries out transformations which enhances efficacy in speed and size of the resultant target program. These optimisation processes are carried out iteratively, with each pass searching for potential improvements to the target program. Programmers can specify which of these optimisations to carry out during compilation of their source code by passing a sequence of flags to the compiler. This project investigates whether machine learning techniques, specifically those based on an evolutionary approach, are able to improve on the standard optimisation sequences (e.g. -O3) available with popular compilers such as GCC and LLVM. This is done by designing and implementing a Genetic Algorithm Framework (GAF) which searches for flag sequences which optimise for compilation time, executable file size, execution time or a combination of these. Identifying a near optimal sequence is time consuming since it requires compiling and executing the given program using various sequences. Although using an identified sequence does not introduce additional overhead except for the program compilation. When tested on real-life applications, the framework achieved 13.98% better performance on average than -O3 flag sequence offered by the LLVM compiler. Three sequences were identified to optimise compilation time, executable file size and execution time individually which yield a 10.18%, 2.58% and a 28.97% average improvement from the -O3 sequence provided by the LLVM compiler.
Description: B.SC.(HONS)COMP.SCI.
URI: https://www.um.edu.mt/library/oar/handle/123456789/65391
Appears in Collections:Dissertations - FacICT - 2019
Dissertations - FacICTCS - 2019

Files in This Item:
File Description SizeFormat 
19BCS001 - Abela Brandon.pdf
  Restricted Access
3.98 MBAdobe PDFView/Open Request a copy


Items in OAR@UM are protected by copyright, with all rights reserved, unless otherwise indicated.