diplomsko delo
Abstract
Višjenivojski programski jeziki programerjem omogočajo pisanje bolj abstraktne in razumljive kode, poleg tega pa omogočajo večjo prenosljivost programov med različnimi sistemi. Prevajalniki za take jezike morajo znati napisan program prevesti v strojno kodo, ki se lahko izvaja na procesorski enoti, zaradi velike konkurence na trgu pa morajo poskrbeti tudi, da je generirana strojna koda učinkovita. Cilj diplomskega dela je v prevajalnik za programski jezik prev, napisan pri predmetu Prevajalniki, dodati fazo optimizacije vmesne kode ter izmeriti zmanjšanje časa izvajanja programov po optimizaciji. V diplomskem delu smo si ogledali vmesne predstavitve v sodobnih prevajalnikih in primerjali optimizacije, ki ju izvajata dva izmed najbolj popularnih prevajalnikov za programski jezik C. Prevajalnik smo nadgradili s srednjim delom, v katerem se nad Appelovo vmesno drevesno kodo izvede več različnih vrst optimizacij in jih podrobno predstavili. Delovanje prevajalnika smo preizkusili na več napisanih testnih primerih, izmerili smo čase izvajanja programov in s tem pokazali, da se optimizirani programi res izvajajo hitreje kot neoptimizirani.
Keywords
optimizacija;računalništvo in informatika;računalništvo in matematika;interdisciplinarni študij;univerzitetni študij;diplomske naloge;
Data
Language: |
Slovenian |
Year of publishing: |
2021 |
Typology: |
2.11 - Undergraduate Thesis |
Organization: |
UL FRI - Faculty of Computer and Information Science |
Publisher: |
[N. Bizjak] |
UDC: |
004.4'42(043.2) |
COBISS: |
69335555
|
Views: |
1019 |
Downloads: |
122 |
Average score: |
0 (0 votes) |
Metadata: |
|
Other data
Secondary language: |
English |
Secondary title: |
Appel's Tree intermediate representation optimisation |
Secondary abstract: |
High-level programming languages allow programmers to write more abstract and understandable code, while also providing better program compatibility between different systems. Compilers for high-level languages must be able to convert high-level program to machine code that can be executed on the CPU and due to high market competitiveness, the compilers must also ensure the generated code is efficient. The goal of this thesis is to add a phase of intermediate code optimisation to the compiler that was written during the Compilers course for prev programming language, and then measure execution time improvement. In this thesis we look at the different intermediate representations used in modern compilers and compare the optimisations performed by two of the most popular compilers for the C programming language. We have enhanced the compiler by adding a middle-end, which executes a series of optimisations on Appel's tree intermediate representations. In the thesis, we also explain how these optimisations are implemented. The implemented compiler was tested using multiple benchmarks, then the execution times were measured, which confirmed that the optimized programs do in fact, run faster than non-optimized ones. |
Secondary keywords: |
optimization;computer science;computer and information science;computer science and mathematics;interdisciplinary studies;diploma;Prevajalniki (programska oprema);Računalništvo;Univerzitetna in visokošolska dela; |
Type (COBISS): |
Bachelor thesis/paper |
Study programme: |
1000407 |
Thesis comment: |
Univ. v Ljubljani, Fak. za računalništvo in informatiko |
Pages: |
74 str. |
ID: |
13103391 |