Integrated Code Generation
Code generation in a compiler is commonly divided into several phases: instruction selection, scheduling, register allocation, spill code generation, and, in the case of clustered architectures, cluster assignment. These phases are interdependent; for instance, a decision in the instruction selec...
Main Author: | |
---|---|
Format: | Doctoral Thesis |
Language: | English |
Published: |
Linköpings universitet, Institutionen för datavetenskap
2011
|
Subjects: | |
Online Access: | http://urn.kb.se/resolve?urn=urn:nbn:se:liu:diva-67471 http://nbn-resolving.de/urn:isbn:978-91-7393-147-2 |
id |
ndltd-UPSALLA1-oai-DiVA.org-liu-67471 |
---|---|
record_format |
oai_dc |
spelling |
ndltd-UPSALLA1-oai-DiVA.org-liu-674712013-01-08T13:07:32ZIntegrated Code GenerationengEriksson, MattiasLinköpings universitet, Institutionen för datavetenskapLinköpings universitet, Tekniska högskolanLinköping : Linköping University Electronic Press2011Computer scienceDatalogiCode generation in a compiler is commonly divided into several phases: instruction selection, scheduling, register allocation, spill code generation, and, in the case of clustered architectures, cluster assignment. These phases are interdependent; for instance, a decision in the instruction selection phase affects how an operation can be scheduled. We examine the effect of this separation of phases on the quality of the generated code. To study this we have formulated optimal methods for code generation with integer linear programming; first for acyclic code and then we extend this method to modulo scheduling of loops. In our experiments we compare optimal modulo scheduling, where all phases are integrated, to modulo scheduling where instruction selection and cluster assignment are done in a separate phase. The results show that, for an architecture with two clusters, the integrated method finds a better solution than the non-integrated method for 39% of the instances. Our algorithm for modulo scheduling iteratively considers schedules with increasing number of schedule slots. A problem with such an iterative method is that if the initiation interval is not equal to the lower bound there is no way to determine whether the found solution is optimal or not. We have proven that for a class of architectures that we call transfer free, we can set an upper bound on the schedule length. I.e., we can prove when a found modulo schedule with initiation interval larger than the lower bound is optimal. Another code generation problem that we study is how to optimize the usage of the address generation unit in simple processors that have very limited addressing modes. In this problem the subtasks are: scheduling, address register assignment and stack layout. Also for this problem we compare the results of integrated methods to the results of non-integrated methods, and we find that integration is beneficial when there are only a few (1 or 2) address registers available. Doctoral thesis, monographinfo:eu-repo/semantics/doctoralThesistexthttp://urn.kb.se/resolve?urn=urn:nbn:se:liu:diva-67471urn:isbn:978-91-7393-147-2Linköping Studies in Science and Technology. Dissertations, 0345-7524 ; 1375application/pdfinfo:eu-repo/semantics/openAccess |
collection |
NDLTD |
language |
English |
format |
Doctoral Thesis |
sources |
NDLTD |
topic |
Computer science Datalogi |
spellingShingle |
Computer science Datalogi Eriksson, Mattias Integrated Code Generation |
description |
Code generation in a compiler is commonly divided into several phases: instruction selection, scheduling, register allocation, spill code generation, and, in the case of clustered architectures, cluster assignment. These phases are interdependent; for instance, a decision in the instruction selection phase affects how an operation can be scheduled. We examine the effect of this separation of phases on the quality of the generated code. To study this we have formulated optimal methods for code generation with integer linear programming; first for acyclic code and then we extend this method to modulo scheduling of loops. In our experiments we compare optimal modulo scheduling, where all phases are integrated, to modulo scheduling where instruction selection and cluster assignment are done in a separate phase. The results show that, for an architecture with two clusters, the integrated method finds a better solution than the non-integrated method for 39% of the instances. Our algorithm for modulo scheduling iteratively considers schedules with increasing number of schedule slots. A problem with such an iterative method is that if the initiation interval is not equal to the lower bound there is no way to determine whether the found solution is optimal or not. We have proven that for a class of architectures that we call transfer free, we can set an upper bound on the schedule length. I.e., we can prove when a found modulo schedule with initiation interval larger than the lower bound is optimal. Another code generation problem that we study is how to optimize the usage of the address generation unit in simple processors that have very limited addressing modes. In this problem the subtasks are: scheduling, address register assignment and stack layout. Also for this problem we compare the results of integrated methods to the results of non-integrated methods, and we find that integration is beneficial when there are only a few (1 or 2) address registers available. |
author |
Eriksson, Mattias |
author_facet |
Eriksson, Mattias |
author_sort |
Eriksson, Mattias |
title |
Integrated Code Generation |
title_short |
Integrated Code Generation |
title_full |
Integrated Code Generation |
title_fullStr |
Integrated Code Generation |
title_full_unstemmed |
Integrated Code Generation |
title_sort |
integrated code generation |
publisher |
Linköpings universitet, Institutionen för datavetenskap |
publishDate |
2011 |
url |
http://urn.kb.se/resolve?urn=urn:nbn:se:liu:diva-67471 http://nbn-resolving.de/urn:isbn:978-91-7393-147-2 |
work_keys_str_mv |
AT erikssonmattias integratedcodegeneration |
_version_ |
1716509578579935232 |