Repository navigation
Track LLVM backend retirement and migration to Whale #93
Description
Current status
LLVM 21 remains Wave's default native backend and is required for supported compilation, target, ABI, and release workflows. Alpha now has an opt-in Wave-to-Whale IR adapter; this does not replace LLVM's native or release coverage.
Wave intends to move native toolchain responsibilities to Whale over time and exclude LLVM from the eventual bootstrap path.
Migration scope
- Define a backend-neutral compiler-to-toolchain interface.
- Preserve target, relocation, code model, ABI, inline assembly, object, linker, and diagnostic contracts.
- Reuse target and ABI fixtures across LLVM and Whale where possible.
- Add explicit backend selection during the transition.
- Establish feature-parity and artifact-compatibility gates.
- Define the bootstrap path and supported host requirements.
- Deprecate LLVM only after Whale passes the required language, ABI, platform, and release tests.
Completion criteria
- Whale can compile the maintained Wave corpus for supported targets.
- Backend-neutral ABI fixtures, including the work tracked in Specify and validate the Wave ABI independently from the C ABI #350 and Define a backend-neutral Wave ABI fixture format #368, pass.
- Release and bootstrap workflows no longer require LLVM.
- Users receive a documented migration path.
- LLVM removal is a deliberate final step, not an intermediate breakage.
This issue records the long-term toolchain direction. Concrete migration components should be opened as focused implementation issues.
Alpha adapter progress
PR #859 introduced the Linux amd64/O0 IR-only adapter (#861). PR #860 implements checked shifts (#863), checked float-to-integer casts (#864) and format-3 reader integration (#862). Generated IR verification and guard probes do not establish native execution parity. LLVM remains the default.
Focused alpha follow-ups
- Adapt the Whale dependency and IR tests to format 4 #868 — Adapt the Whale dependency and IR tests to format 4
- Execute Wave-generated integer IR with the bounded Whale oracle #869 — Execute Wave-generated integer IR with the bounded Whale oracle
- Lower integer division and remainder in the Whale adapter #870 — Lower integer division and remainder in the Whale adapter
- Lower floating division and remainder in the Whale adapter #871 — Lower floating division and remainder in the Whale adapter
- Lower scalar compound assignments in the Whale adapter #872 — Lower scalar compound assignments in the Whale adapter
- Lower for loops with correct continue targets in Whale #873 — Lower for loops with correct continue targets in Whale
- Consume typed global scalar constants in Whale lowering #874 — Consume typed global scalar constants in Whale lowering
- Accept resolved scalar type aliases in Whale programs #875 — Accept resolved scalar type aliases in Whale programs
- Lower omitted default arguments for direct Whale calls #876 — Lower omitted default arguments for direct Whale calls
- Allow grouped void calls in Whale expression statements #877 — Allow grouped void calls in Whale expression statements
- Lower the existing char scalar type and literals in Whale #878 — Lower the existing char scalar type and literals in Whale
- Lower typed scalar pointer operations through Whale #879 — Lower typed scalar pointer operations through Whale
- Lower fixed arrays and checked indexing in Whale #880 — Lower fixed arrays and checked indexing in Whale
- Lower typed struct construction and field access in Whale #881 — Lower typed struct construction and field access in Whale
- Lower scalar integer match statements through Whale #882 — Lower scalar integer match statements through Whale
- Lower uninitialized local declarations with Whale initialization tracking #883 — Lower uninitialized local declarations with Whale initialization tracking
- Define and implement Whale lowering for Wave integers wider than 128 bits #884 — Define and implement Whale lowering for Wave integers wider than 128 bits
- Name unsupported constructs in Whale diagnostics #885 — Name unsupported constructs in Whale diagnostics
- Expose Whale target and emit-kind capability queries #886 — Expose Whale target and emit-kind capability queries
- Update README development status and add a Whale IR example #887 — Update README development status and add a Whale IR example
- Test that failed Whale multi-input lowering preserves all outputs #894 — Test that failed Whale multi-input lowering preserves all outputs
- Report Whale verification resource limits separately from internal errors #895 — Report Whale verification resource limits separately from internal errors
Activity
[-]Temporary LLVM Usage[/-][+]Track LLVM backend retirement and migration to Whale[/+]