Code optimisation for the NZTAB Pascal compiler
The aim of this project was optimisation of the code produced by the NZTAB Pascal compiler. This compiler is used for almost all the code in the TAB's nationwide betting system. The desire to improve the performance of the code was prompted by two reasons: * Certain heavily-used parts of the code are presently written in assembler for efficiency. For maintainability, it would be better to have all code written in Pascal. * The performance of the betting system is significantly affected by certain system control functions. The TAB wished to pursue the adding of an optimisation stage to the compiler so that performance might be improved in that way. The task of this project, then, was to consider the problem of adding optimisation to the TAB compiler, assessing possible optimisation techniques, and implementing the best of these. There are several aspects to this project and the structure of this report reflects that. This does not mean, however, that each aspect represents a chronological phase. The first section deals with the problem and with the constraints placed on possible optimisation methods. Section two briefly presents various kinds of optimisations that are often done and reviews the main methods available for doing them. In section three there is an analysis of the nature of the code currently produced by the TAB compiler and the implications of this for optimisation. Fourthly, various optimisation strategies that were considered are presented with their problems and advantages. Section five deals with two strategies for which some implementation was done, with the problems that arise in their implementation, and with their potential benefits. Finally, in section six, some questions are posed that are relevant to if and how the project should proceed and some recommendations are given. Naturally, the ideal result of such a project would have been the completion of an optimiser that performed sufficiently well for the earlier goals to be realised: this has not been achieved. One should remember though that this project can viewed in two ways. In one way it can be seen as being required to add some form of optimisation to a Pascal compiler. At the other level, however, it can be seen as ryeeding to provide optimisation that is sufficient for the goals given at the start of this introduction, and that is obtained in a way that is acceptable to the TAB environment. This latter goal is far more difficult but it is towards this goal that the efforts of this project have been directed.
SubjectsField of Research::08 - Information and Computing Sciences::0803 - Computer Software::080308 - Programming Languages
- Engineering: Reports