Annotation

THE LLVM2PY LIBRARY FOR ANALYZING LLVM INTERMEDIATE REPRESENTATION AND ITS APPLICATION IN ESTIMATING PARALLELIZABILITY OF BASIC BLOCKS
Скачать PDF
Annotation: The article addresses the design and utilization of the developed library, llvm2py, which is intended for the rap-id construction of static program analyzers written in Python for LLVM intermediate representation. The ne-cessity of the presented library is demonstrated, as are the specific architectural solutions chosen. The LLVM2Py library has been used to develop a tool for the static analysis of parallelizability of basic blocks. The tool enables the calculation of the acceleration coefficient for a specific basic block through the use of an ab-stract parallel LLVM processor. Moreover, it allows for the calculation of the minimum number of parallel functional units of the processor that provide the maximum value of the acceleration coefficient. The efficacy of the developed tool is evaluated through experimentation with ten exemplar algorithms, each implemented in the C language. The following algorithms were used for the purposes of testing: Blowfish, ZIP, JPEG, AES, Base64, ChaCha20, SHA1, CSV, SHA256, and MD5. The parallelization statistics are presented for the most accelerated basic block of each program due to instruc-tion-level parallelism. To illustrate, the JPEG algorithm achieved a 5.4-fold acceleration of the basic block exe-cution with the minimum utilization of the number of functional units, which was equal to 6 units. The developed tool, when used in conjunction with information from the profiler regarding the frequency of execution of linear sections, can assist in making informed decisions regarding the porting of code for execution to a specialized architecture with instruction-level parallelism. The functionality of the llvm2py library is planned to be further extended for code compilation tasks, including the creation of domain-specific compilers for specialized processors.
Page numbers: 87-96.
For citation: Pavlov K.S., Sovietov P.N. The llvm2py library for analyzing llvm intermediate representation and its application in estimating parallelizability of basic blocks // Electronic Scientific Journal IT-Standard. – 2024. – No. 3. – pp. 87-96.