Skip to content

jevopt

C/C++ compiler driver where Jev decides whether to inline each discretionary call site, compared against Clang -Oz.

ProjectresearchGPL-3.0

Overview

jevopt combines Clang's optimiser with Jev for function-call inlining. At every discretionary call site, Jev decides whether to inline, using the current LLVM IR, the original source, build context and a few structural facts. It hooks into LLVM's interactive ML inliner advisor through a plugin, targeting Linux and a pinned LLVM 21 toolchain.

The compile command builds a directory of C or C++ sources twice, once with Clang -Oz as a reference and once with Jev-guided inlining, and writes both binary sizes and the full decision trace to result.json. An optional verify flag runs both binaries and compares exit code and stdout. A passthrough mode returns LLVM's own decisions through the same channel, which must match regular Clang byte for byte, as an integration check. LTO is not supported. A dashboard ships with released jevopt-embench data. It is a research project for compiler and ML-for-systems enthusiasts.

What the decision model decides

TypeQuestionAnswers
Yes / noShould this call site be inlined?—

How it works

  1. Compile sources with the LLVM plugin enabled
  2. At each discretionary call site, send IR, source and context to Jev
  3. Apply Jev's inline decision via the ML inliner advisor
  4. Build a Clang -Oz reference binary and compare sizes
  5. Optionally verify both binaries produce the same output

Strengths

  • Side-by-side size comparison against Clang -Oz
  • Full decision trace for every call site
  • Passthrough mode validates the integration
  • Dashboard for benchmark runs

Caveats

  • Linux and LLVM 21 only; no LTO
  • Each call site is a paid API call during compilation
  • Research prototype; correctness relies on optional verification

Getting started

uv sync, cp .env.example .env (add TYPESAFE_API_KEY), then uv run jevopt compile --source-dir examples/inline_probe --output-dir build/demo --verify

At a glance

Type
Project
Status
research
Language
Python
Runtime
LLVM 21 plugin and CLI
Has code
yes
License
GPL-3.0

Use cases and integrations

How curated lists describe it

Frequently asked questions

What does Jev decide?

Whether to inline each discretionary function call site during compilation.

How do I know it is better?

Each run builds a Clang -Oz reference and records both binary sizes in result.json.

Why no LTO?

LLVM's interactive ML inliner advisor only runs per translation unit, not at link time.

Related projects

  • TypeAR★ 946

    TypeLLM: Jev-inspired type-safe decoding for existing autoregressive LLMs on SGLang, with schema-guaranteed typed outputs.

    ProjectbetaPython
  • 33-chapter Chinese tutorial on agentic RL and GRPO, including a chapter on when Jev-style external decision models beat training with RL.

    ProjectresearchPython
  • Pre-registered field test of Jev, GLiNER2.5-Decide, Laya and other decision models against small LLMs on fresh September 2026 data.

    ProjectresearchPython
  • Black-box reverse-engineering archive studying how the Jev decision model behaves, with evidence matrices and calibration analysis.

    ProjectresearchPython
  • Independent API-only audit of what Jev's probabilities mean: abstain removal, Korean, coherence, option order, interference and caching.

    ProjectresearchPython
  • Research decoder that treats Jev as a language model, assembling replies from repeated choices over phrases, words and letters.

    ProjectresearchPython