Analysis of the Algorithms of the Constituent Parts of the Compiler and its Optimization

Cover Page

Cite item

Full Text

Open Access Open Access
Restricted Access Access granted
Restricted Access Subscription Access

Abstract

Program optimization arose as a response to the emergence of high-level programming languages, and includes special techniques and methods used in building compilers to produce sufficiently efficient object code. A combination of these techniques constituted in the past and are now an integral part of so-called optimizing compilers, the purpose of which is to create object code, saving computer resources such as processor time and memory. For modern supercomputers, the requirement to make proper use of hardware features is also added. In this context, issues related to compiler optimization deserve special attention, which may involve adapting the compiler to reduce runtime or object size, or both. In view of the above, the aim of the paper is to analyze the algorithms of the compiler constituents and outline ways to optimize it. The general technology of the compiler is briefly characterized. Particular attention is paid to the main functions of the algorithms, which are implemented at different stages of the compiler’s work. The possibilities of using machine learning to optimize compilers are also considered.

About the authors

Ilya A. Kharin

National Research University “MEI”

Author for correspondence.
Email: xarin.ilya@bk.ru

postgraduate student at the Department of Computing Machines, Systems and Networks of the National Research University “MEI”

Russian Federation, Moscow

Marina V. Raskatova

National Research University “MEI”

Email: marvp@yandex.ru

Candidate of Engineering; associate professor at the Department of Computing Machines, Complexes and Systems of the National Research University “MEI”

Russian Federation, Moscow

References

  1. Aschwanden P. CcNav: Understanding compiler optimizations in binary code. IEEE Transactions on Visualization and Computer Graphics. 2021. Vol. 27. No. 2. Pp. 667–677.
  2. Chen Ge. CRAC: An automatic assistant compiler of checkpoint/restart for OpenCL program. Concurrency and Computation: Practice and Experience. 2022. Vol. 34. No. 8. Pp. 14–22.
  3. Huang Ya., Xie B. Fine-grained compiler identification with sequence-oriented neural modeling. IEEE Access: Practical Innovations, Open Solutions. 2021. Vol. 9. Pp. 49160–49175.
  4. Sampson A., Adit N. Performance left on the table: An eva-luation of compiler autovectorization for RISC-V. IEEE Micro. 2022. Vol. 42. No. 5. Pp. 41–48.
  5. Tang Yi., Zhou Zh.. Detecting compiler warning defects via diversity-guided program mutation. IEEE Transactions on Software Engineering. 2021. Vol. 48. No. 11. Pp. 4411–4432.
  6. Tewary M., Salcic Z. Compiler-assisted energy reduction of java real-time programs. Microprocessors and Microsys-tems. 2022. Vol. 89. No. 3. Pp. 78–83.
  7. Wang Zh. Machine learning in compiler optimization. Proceedings of the IEEE. 2018. Vol. 106. No. 11. Pp. 1879–1901.
  8. Baglii A.P., Krivosheev N.M., Steinberg B.Y. Automation of program paralleling with data transfer optimization. Scientific Service on the Internet. 2022. No. 24. Pp. 81–92. (In Rus.)
  9. Bolotnov A.M., Nurislamova E.A. The influence of GCC compiler optimization on program code efficiency in C++. Modern Science-Intensive Technologies. 2019. No. 12-2. Pp. 266–270. (In Rus.)
  10. Vyukova N.I., Galatenko V.A., Samborsky S.V. Means of dynamic program analysis in GCC and CLANG compilers. Programming. 2020. No. 4. Pp. 46–64. (In Rus.)
  11. Malyavko A.A. Error handling in the parser of EL compiler. Scientific Vestnik of Novosibirsk State Technical University. 2019. No. 2 (75). Pp. 37–48. (In Rus.)
  12. Sovetov P.N. Iterative approach using a compiler to synthesize and model a problem-oriented instruction set. International Journal of Open Information Technologies. 2019. Vol. 7. No. 10. Pp. 14–21. (In Rus.)
  13. Strelets A.I., Chernikova E.A., Malkov L.V., Dozhdev A.I. Structure of the compiler of a one-time program. International Journal of Humanities and Natural Sciences. 2019. No. 1-1. Pp. 146–147. (In Rus.)
  14. Tretiak A.V. The importance of indentation in the development of lexical analyzer compilers. Molodezh. Science. Innovations. 2021. Vol. 1. Pp. 306–309. (In Rus.)
  15. Steinberg B.J. Transformations of programs – fundamental basis for creating optimizing parallelizing compilers. Software Systems: Theory and Applications. 2021. Vol. 12. No. 1 (48). Pp. 21–113. (In Rus.)

Supplementary files

Supplementary Files
Action
1. JATS XML
2. Fig. 1. Compiler phases [Aschwanden, 2021]

Download (59KB)
3. Fig. 2. An example of how a lexical analyzer works

Download (65KB)
4. Fig. 3. Parsing example

Download (73KB)
5. Fig. 4. Matching optimized and source code [Wang, 2018]

Download (56KB)
6. Fig. 5. Example of eliminating unnecessary instructions

Download (59KB)
7. Fig. 6. A general view of supervised machine learning in compilers а – feature engineering; b – learning model; с – deployment

Download (117KB)
8. Fig. 7. Compacting an OpenCL thread: a – the original OpenCL core; b – code conversion with compaction factor 2

Download (96KB)
9. Fig. 8. Cycle of CompilerGym interaction

Download (141KB)


Согласие на обработку персональных данных с помощью сервиса «Яндекс.Метрика»

1. Я (далее – «Пользователь» или «Субъект персональных данных»), осуществляя использование сайта https://journals.rcsi.science/ (далее – «Сайт»), подтверждая свою полную дееспособность даю согласие на обработку персональных данных с использованием средств автоматизации Оператору - федеральному государственному бюджетному учреждению «Российский центр научной информации» (РЦНИ), далее – «Оператор», расположенному по адресу: 119991, г. Москва, Ленинский просп., д.32А, со следующими условиями.

2. Категории обрабатываемых данных: файлы «cookies» (куки-файлы). Файлы «cookie» – это небольшой текстовый файл, который веб-сервер может хранить в браузере Пользователя. Данные файлы веб-сервер загружает на устройство Пользователя при посещении им Сайта. При каждом следующем посещении Пользователем Сайта «cookie» файлы отправляются на Сайт Оператора. Данные файлы позволяют Сайту распознавать устройство Пользователя. Содержимое такого файла может как относиться, так и не относиться к персональным данным, в зависимости от того, содержит ли такой файл персональные данные или содержит обезличенные технические данные.

3. Цель обработки персональных данных: анализ пользовательской активности с помощью сервиса «Яндекс.Метрика».

4. Категории субъектов персональных данных: все Пользователи Сайта, которые дали согласие на обработку файлов «cookie».

5. Способы обработки: сбор, запись, систематизация, накопление, хранение, уточнение (обновление, изменение), извлечение, использование, передача (доступ, предоставление), блокирование, удаление, уничтожение персональных данных.

6. Срок обработки и хранения: до получения от Субъекта персональных данных требования о прекращении обработки/отзыва согласия.

7. Способ отзыва: заявление об отзыве в письменном виде путём его направления на адрес электронной почты Оператора: info@rcsi.science или путем письменного обращения по юридическому адресу: 119991, г. Москва, Ленинский просп., д.32А

8. Субъект персональных данных вправе запретить своему оборудованию прием этих данных или ограничить прием этих данных. При отказе от получения таких данных или при ограничении приема данных некоторые функции Сайта могут работать некорректно. Субъект персональных данных обязуется сам настроить свое оборудование таким способом, чтобы оно обеспечивало адекватный его желаниям режим работы и уровень защиты данных файлов «cookie», Оператор не предоставляет технологических и правовых консультаций на темы подобного характера.

9. Порядок уничтожения персональных данных при достижении цели их обработки или при наступлении иных законных оснований определяется Оператором в соответствии с законодательством Российской Федерации.

10. Я согласен/согласна квалифицировать в качестве своей простой электронной подписи под настоящим Согласием и под Политикой обработки персональных данных выполнение мною следующего действия на сайте: https://journals.rcsi.science/ нажатие мною на интерфейсе с текстом: «Сайт использует сервис «Яндекс.Метрика» (который использует файлы «cookie») на элемент с текстом «Принять и продолжить».