Adaptive Optimization System (AOS) uses machine learning to select sequences of optimization for dynamic compilation that considers both code quality and compilation overhead for The OpenISA Dynamic Binary Translator (OI-DBT).
OI-DBT implements a fast OpenISA interpreter together with an optimizing dynamic compiler supporting several region formation techniques. It dynamically compiles OI instructions into target instructions using the LLVM (7.0) infrastructure. Moreover, OI-DBT translates OI instructions in parallel to the emulation decreasing the compilation overhead. All to achieve a high-performance emulation of OpenISA binaries.
To build OI-DBT, you are going to need g++7.1 or later with C++17 support, CMake 2.8 or later, PAPI and LLVM 7.0. After installing all dependencies, it is a simple cmake/make usage:
cd dbt-openisa
mkdir build
cd build
cmake ..
make
sudo make install
After building and installing oi-dbt, you can easily use it to emulate OpenISA elf binaries using the following commands:
oi-dbt [-rft {net, mret2, lei, lef, netplus} | -interpreter] -bin PathToBinary [-v]
ARGUMENTS:
-bin : Path to the binary which will be emulated.
-h : Displays the help message
-interpret : Only interpret.
-rft : Region Formation Technique (net)
-aos : Path to the adaptative system optimization file
-roi : Region of investigation ID:TAs
-v : Displays the OpenISA instructions from the compiled regions
This project was developed at the DIN UEM as part of @thaisacs TCC. You are free to use this code under the MIT LICENSE.