Skip to content

Carry Verus value-range/no-alias facts as IR premises + algebraic mid-end — feed synth's beat-LLVM specialization #240

Description

@avrabe

Part of the meld→loom→synth 0.70× (beat-LLVM) roadmap (gale benches/gust/optimization/BEAT-LLVM-0.7x.md (PR pulseengine/gale#119)). Two asks:

1. Algebraic mid-end. gale's dissolved gust_mix is algebraically clamp(ch+476,1000,2000) but synth emits the literal 256*(ch-1024)>>8 (~6 wasted instrs LLVM folds away). loom is the natural place to strength-reduce/constant-fold 256*x>>8 → x and propagate the offset before synth lowers. Biggest single instruction-count win toward parity.

2. Carry proof-carrying facts. The leapfrog past parity needs the machine-checked invariants (Verus/Rocq/Kani value-ranges, no-overflow, no-alias, bounded indices) attached to the dissolved functions as IR premises (assume-style / range / nonnull / noalias annotations), derived from the specs + whole-composition analysis. synth consumes them to specialize (clamp-branch elision, type narrowing, check elision) — optimizations LLVM can't make because it has no proofs. This is the fact-passing contract that lets the verified pipeline beat the unverified one. See the synth + meld issues for the consuming/producing ends.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions