Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aengelke/rellume
Lift machine code to performant LLVM IR
https://github.com/aengelke/rellume
llvm llvm-ir x86-86
Last synced: about 10 hours ago
JSON representation
Lift machine code to performant LLVM IR
- Host: GitHub
- URL: https://github.com/aengelke/rellume
- Owner: aengelke
- License: lgpl-2.1
- Created: 2019-05-06T07:53:03.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-06-17T08:47:10.000Z (5 months ago)
- Last Synced: 2024-08-03T09:03:24.063Z (4 months ago)
- Topics: llvm, llvm-ir, x86-86
- Language: C++
- Homepage:
- Size: 989 KB
- Stars: 356
- Watchers: 18
- Forks: 40
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Rellume — Lift machine code to LLVM IR
Rellume is a lifter for x86-64/AArch64/RISC-V64 machine code to LLVM IR with focus on the performance of the lifted code. The generated LLVM IR can be compiled and executed again, for example using LLVM's JIT compiler, ideally having the same (or even better) performance as the original code. Special care is taken to model the SIMD instructions and pointers in a way that the optimizer can generate efficient code. The lifter operates on a set of specified instructions (or decodes the control flow automatically) and creates an LLVM-IR function with the same semantics. These functions operate on a generic structure containing the virtual CPU state, but can be wrapped for an arbitrary calling convention.
### Use Cases
- Binary rewriting:
- Binary Translation: translating machine code to a different architecture while making use of compiler optimizations. This is implemented in [Instrew](https://github.com/aengelke/instrew).
- Performance improvement: specialization for runtime data, e.g. known parameters or memory locations. This is implemented in the LLVM back-end of [BinOpt](https://github.com/aengelke/binopt).
- Instrumentation: insert tracing and interception code in hot code paths, where high quality machine code is required.
- Binary analysis: existing tooling for analysis of LLVM IR code can be re-used for binary code.### Example
See `examples/` for usage examples.### Publications
- Alexis Engelke. Optimizing Performance Using Dynamic Code Generation. Dissertation. Technical University of Munich, Munich, 2021. ([Thesis](https://mediatum.ub.tum.de/doc/1614897/1614897.pdf))
- Alexis Engelke and Martin Schulz. Instrew: Leveraging LLVM for High Performance Dynamic Binary Instrumentation. VEE'20, March 2020. (Please cite this paper when referring to Rellume.)
- Alexis Engelke and Josef Weidendorfer. Using LLVM for Optimized Light-Weight Binary Re-Writing at Runtime. In Proceedings of the 22nd int. Workshop on High-Level Parallel Programming Models and Supportive Environments (HIPS 2017). Orlando, US, 2017 ([PDF of pre-print version](http://wwwi10.lrr.in.tum.de/~weidendo/pubs/hips17.pdf))### License
LGPLv2.1+