Skip to content
Lift x86-64 to performant LLVM IR
C++ Python Meson C
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
data/rellume general: Some refactoring to use X86Reg Jan 7, 2020
examples api: Make configuration independent of function Oct 12, 2019
include/rellume instr: Add function to query control flow flags Jan 25, 2020
tests tests: Buffer full output to reduce IO Jan 26, 2020
.gitignore Make disassembler a git submodule May 6, 2019
.gitmodules Use https URL for submodule May 6, 2019
.travis.yml meson: Bump LLVM dependency to version 8 Jan 18, 2020
LICENSE Initial commit May 5, 2019 README: Update text on lifted function interface Dec 17, 2019
Rellume.sublime-project Initial commit May 5, 2019 meson: Bump LLVM dependency to version 8 Jan 18, 2020

Rellume — Lifts x86-64 to LLVM IR

Rellume is a lifter for x86-64 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 SSE 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 x86-64 CPU state, but can be wrapped for an arbitrary calling convention.

Use Cases

  • Binary rewriting:
    • Performance improvement: specialization for runtime data, e.g. known parameters or memory locations. This is implemented in the LLVM back-end of DBrew.
    • 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.


See examples/lifter.c


  • 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)



You can’t perform that action at this time.