Native Performance Research Register
This register records the Milestone 0 research baseline for native performance
and freestanding toolchain work. These are implementation inputs, not adoption
decisions. The 0x0 compiler and toolchain remain source-owned.
Prior-Art Decisions
- Thin whole-program optimization: use compact cross-module summaries and
parallel backend work as the model for scalable whole-program optimization.
Do not use monolithic whole-program merging as the required release path.
- Profile-guided optimization: require representative workload profiles before
PGO data can drive release decisions. Stale or missing profiles must reduce
optimization confidence, not change correctness.
- Post-link layout: treat post-link layout as a separate source-owned toolchain
stage with relocation evidence and stale-profile detection.
- Monomorphization: generate concrete instances for speed, but require
deduplication, budget reporting, and specialization diagnostics to control
compile time and binary size.
- Volatile and MMIO: volatile operations must not be deleted, duplicated,
merged, split, or reordered relative to other volatile operations. MMIO
addresses may be outside normal memory.
- Tail calls: distinguish optional tail-call optimization from required
no-stack-growth calls. Required tail calls must fail compilation when the
backend cannot honor them.
- Strictness and demand analysis: use bounded sound analyses to identify needed
values, unused fields, and safe calling convention improvements. Unknown
effects, unsafe pointers, volatile operations, and dynamic dispatch must
invalidate unsafe conclusions.
- Fast-codegen tier: keep a fast code generation mode for development and
bounded checks, while optimized release modes can run heavier passes.
- Linker scripts and memory maps: freestanding targets require source-owned
section placement, symbols, fixed addresses, and memory-region evidence.
- Embedded emulation: every embedded target profile must run under QEMU or an
equivalent deterministic emulator before physical evidence can close.
Sources
- Clang ThinLTO: <https://clang.llvm.org/docs/ThinLTO.html>
- LLVM PGO build guide: <https://llvm.org/docs/HowToBuildWithPGO.html>
- LLVM BOLT: <https://github.com/llvm/llvm-project/blob/main/bolt/README.html>
- Rust monomorphization: <https://rustc-dev-guide.rust-lang.org/backend/monomorph.html>
- LLVM volatile memory accesses: <https://llvm.org/docs/LangRef.html#volatile-memory-accesses>
- LLVM call instruction and tail calls: <https://llvm.org/docs/LangRef.html#call-instruction>
- Demand analysis in Haskell: <https://www.microsoft.com/en-us/research/publication/theory-practice-demand-analysis-haskell/>
- Cranelift: <https://cranelift.dev/>
- lld linker scripts: <https://lld.llvm.org/ELF/linker_script.html>