Skip to content

[codex] Move LLVM instruction cost table to v4 cost lens - #3300

Merged
briansrls merged 4 commits into
mainfrom
session/snappy-ferret-92
May 18, 2026
Merged

briansrls merged 4 commits into
mainfrom
session/snappy-ferret-92

Conversation

@briansrls

Copy link
Copy Markdown
Contributor

Summary

  • Move llvm_instruction_cost out of src/v4/extdeps/languages/llvm_ir.dag and into src/v4/lens/cost.dag, so the LLVM instruction cost table is owned by the cost lens rather than the LLVM IR shape model.
  • Update the dissolution inventory to mark P9 landed and reduce the pending predicate count accordingly.
  • Add an integration ratchet that checks the cost table has a single authority under v4/lens/cost.dag and is not still listed or defined in llvm_ir.dag.

Why

P9 in docs/audit/dissolution-inventory.md identified llvm_instruction_cost as a property-projection table that should be owned by lens/cost.dag / T-12. Keeping it in llvm_ir.dag made LLVM IR both the instruction-shape authority and the cost-table authority.

Validation

  • cargo test -p v3-compiler v4_lens_cost_owns_llvm_instruction_cost_table --test integration

Note: a semantic compile smoke for src/v4/lens/cost.dag is not viable yet because the current v4 lowering path rejects block-bodied match functions and single-file v4 sibling imports; the ratchet therefore pins the single-authority placement directly.

@briansrls
briansrls marked this pull request as ready for review May 18, 2026 07:16
@briansrls
briansrls merged commit a3d94f2 into main May 18, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant