You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Port compiler.rs HIR cost-model statics to specs/compiler/hir_cost_models.t27 through t27o #9114
tri t27o bootstrap/src/compiler.rs converts these associated fns, which take and return only u32/i64. Each was run alone through tri t27o --check on the lab at master ea1bccd, and its oracle passed (7 vectors each; the vectors are generic, so see #9102):
Port pattern (region-safe): keep each hand fn's signature and replace its body with one call into the generated module, so the diff stays inside the listed fns. Callers (analyze_module exists twice in the file, so it cannot be a region) are not edited.
User Scenarios
Given TimingModel::fmax_from_delay(2000), when compiler.rs runs it, then the value comes from hir_cost_models::fmax_from_delay and equals what the hand body returned.
Given the existing unit tests test_est_comb_delay .. test_est_tree_levels_three, when cargo test --release runs, then they pass unchanged.
Requirements
FR-001: specs/compiler/hir_cost_models.t27 MUST define the 13 functions and the constants they read (Self::... consts become module consts), with t27o's bodies, and tests that call each by name with expected values printed by the hand Rust on the lab (boundary values: 0, 1, the thresholds in each body, u32::MAX where it does not overflow).
FR-002: bootstrap/gen/rust/compiler/hir_cost_models.rs MUST be unedited t27c gen-rust output, mounted by #[path].
FR-003: Each listed hand fn MUST become a one-line call into the generated module.
FR-004: The PR MUST be net <= 0 in foreign lines, show gen / gen-verilog / gen-rust / gen-c byte-identical over every tracked spec (master t27c vs branch t27c), match cargo test --release of clean master, and re-compute bootstrap/stage0/FROZEN_HASH.
Success Criteria
t27c test-report specs/compiler/hir_cost_models.t27 reports 0 FAIL and 0 vacuous, with a test per function.
t27c gen-rust specs/compiler/hir_cost_models.t27 is byte-equal to bootstrap/gen/rust/compiler/hir_cost_models.rs.
The diff touches compiler.rs only inside the fns named in this issue, apart from the one #[path] mount block at the top of the file.
cargo test --release in bootstrap/ gives the same pass and fail counts and failure names as clean master.
Region lines to be added once the merge-side region check is live (see #9062).
Activity
compiler: HIR cost-model statics move to specs/compiler/hir_cost_mode…
compiler: HIR cost-model statics move to specs/compiler/hir_cost_mode…
t27o: self-less associated fns, while-let/if-let-Err/tuple patterns, …