TY - GEN
T1 - Robust Practical Binary Optimization at Run-Time using LLVM
AU - Engelke, Alexis
AU - Schulz, Martin
N1 - Publisher Copyright:
© 2020 IEEE.
PY - 2020/11
Y1 - 2020/11
N2 - In High Performance Computing (HPC) the performance of applications is paramount, which is has led to a wide body of work on optimizing compilers. However, compilers alone are naturally limited in their potential, as they cannot exploit run-Time information to specialize generated code. For this reason, run-Time components to perform such specializations are gaining traction. In particular, application or use-case driven specializations have a high potential for optimizations, as they can benefit from explicit guidance from the application or the user, which allows for targeted changes incorporating specific knowledge. Because full compilers and sources are usually unavailable during computation, specializations have to be done at machine code level. However, existing libraries for binary specialization face structural limitations of separating optimization and code generation, in addition to numerous implementation gaps. In this paper, we describe BinOpt, a novel and robust library for performing application-driven binary optimization and specialization using LLVM. A machine code function is lifted directly to LLVM-IR, optimized in LLVM while making use of application-specified information, used to generate a new specialization for a function, and integrated back to the original code. We apply this technique to existing optimized code and show that significant performance improvements can be observed with only a small optimization time overhead.
AB - In High Performance Computing (HPC) the performance of applications is paramount, which is has led to a wide body of work on optimizing compilers. However, compilers alone are naturally limited in their potential, as they cannot exploit run-Time information to specialize generated code. For this reason, run-Time components to perform such specializations are gaining traction. In particular, application or use-case driven specializations have a high potential for optimizations, as they can benefit from explicit guidance from the application or the user, which allows for targeted changes incorporating specific knowledge. Because full compilers and sources are usually unavailable during computation, specializations have to be done at machine code level. However, existing libraries for binary specialization face structural limitations of separating optimization and code generation, in addition to numerous implementation gaps. In this paper, we describe BinOpt, a novel and robust library for performing application-driven binary optimization and specialization using LLVM. A machine code function is lifted directly to LLVM-IR, optimized in LLVM while making use of application-specified information, used to generate a new specialization for a function, and integrated back to the original code. We apply this technique to existing optimized code and show that significant performance improvements can be observed with only a small optimization time overhead.
KW - Binary Translation
KW - Dynamic Code Generation
KW - High Performance Computing
KW - LLVM
KW - Run-Time Optimization
UR - http://www.scopus.com/inward/record.url?scp=85100269823&partnerID=8YFLogxK
U2 - 10.1109/LLVMHPCHiPar51896.2020.00011
DO - 10.1109/LLVMHPCHiPar51896.2020.00011
M3 - Conference contribution
AN - SCOPUS:85100269823
T3 - Proceedings of LLVM-HPC2020 and HiPar 2020 - 6th Workshop on the LLVM Compiler Infrastructure in HPC and Workshop on Hierarchical Parallelism for Exascale Computing, Held in conjunction with SC 2020: The International Conference for High Performance Computing, Networking, Storage and Analysis
SP - 56
EP - 64
BT - Proceedings of LLVM-HPC2020 and HiPar 2020 - 6th Workshop on the LLVM Compiler Infrastructure in HPC and Workshop on Hierarchical Parallelism for Exascale Computing, Held in conjunction with SC 2020
PB - Institute of Electrical and Electronics Engineers Inc.
T2 - 6th Workshop on the LLVM Compiler Infrastructure in HPC and Workshop on Hierarchical Parallelism for Exascale Computing, LLVM-HPC2020 and HiPar 2020
Y2 - 12 November 2020
ER -