LLVM 22.x tile for building compilers, language runtimes, and out-of-tree tooling
88
83%
Does it follow best practices?
Impact
96%
1.23xAverage score across 5 eval scenarios
Passed
No known issues
A startup is building a domain-specific scripting language for financial analysts. The language supports simple arithmetic expressions with named variables. To give users instant feedback, the team wants a REPL (Read-Eval-Print Loop) that compiles each expression to native code on-the-fly and executes it immediately — giving the performance of compiled code without a separate compile step.
The team has a partially-written codebase that still uses MCJIT from an older LLVM version. Their senior engineer left notes saying MCJIT is gone in the new LLVM and the whole JIT layer needs to be rewritten. You've been brought in to write the new JIT infrastructure from scratch using the current LLVM 22 APIs.
The REPL should handle expressions like:
2 + 3 * 4 → 14let x = 10 (store a variable)x + 5 → 15Since this will run in a headless CI environment without interactive input, implement the REPL logic as a runExpressions function that takes a vector of expression strings (or pre-built IR modules) and evaluates them in sequence, printing results to stdout.
Produce a single self-contained C++ source file jit_repl.cpp that:
main() function that demonstrates the REPL by evaluating at least 3 hardcoded expressions and printing resultsYou do not need to implement a full parser — you may hardcode the expressions as LLVM IR construction code (using IRBuilder) to demonstrate the JIT pipeline. The focus is on the JIT infrastructure, not the parser.
Also produce CMakeLists.txt for building the project against LLVM 22.
docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
skills
add-alias-analysis
add-attributes-metadata
add-calling-convention
add-debug-info
add-exception-handling
add-gc-statepoints
add-intrinsic
add-lto
add-sanitizer
add-vectorization-hint
frontend-to-ir
jit-setup
lit-filecheck
lower-struct-types
new-target
out-of-tree-setup
tessl-llvm
version-sync