Skip to content

Conversation

@steveklabnik
Copy link
Collaborator

Implement Place abstraction in Rue's IR to represent memory locations (lvalues) as first-class values. This eliminates redundant Load instructions for array indexing and field access.

Key changes:

  • Add Place, PlaceBase, Projection types to rue-cfg
  • Add PlaceRead/PlaceWrite instructions replacing FieldGet/IndexGet
  • Update x86_64 and aarch64 backends with place lowering methods
  • Update AIR with AirPlace, AirPlaceRef, and place-based instructions
  • Remove obsolete trace_field_chain/trace_index_chain methods

This unified instruction set (2 instructions instead of 6) provides:

  • Smaller IR with fewer intermediate Load instructions
  • Simpler codegen that walks projections directly
  • Better optimization opportunities for aliasing analysis

Resolves merge conflict with CfgLowerContext refactoring from trunk.

🤖 Generated with Claude Code

@steveklabnik steveklabnik enabled auto-merge January 6, 2026 05:53
Implement Place abstraction in Rue's IR to represent memory locations
(lvalues) as first-class values. This eliminates redundant Load
instructions for array indexing and field access.

Key changes:
- Add Place, PlaceBase, Projection types to rue-cfg
- Add PlaceRead/PlaceWrite instructions replacing FieldGet/IndexGet
- Update x86_64 and aarch64 backends with place lowering methods
- Update AIR with AirPlace, AirPlaceRef, and place-based instructions
- Remove obsolete trace_field_chain/trace_index_chain methods

This unified instruction set (2 instructions instead of 6) provides:
- Smaller IR with fewer intermediate Load instructions
- Simpler codegen that walks projections directly
- Better optimization opportunities for aliasing analysis

Resolves merge conflict with CfgLowerContext refactoring from trunk.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@steveklabnik steveklabnik force-pushed the steveklabnik/push-lzpqmzmqpuqt branch from 7014134 to 685dd9b Compare January 6, 2026 19:13
@steveklabnik steveklabnik added this pull request to the merge queue Jan 6, 2026
Merged via the queue into rue-language:trunk with commit 309ccbc Jan 6, 2026
4 checks passed
@steveklabnik steveklabnik deleted the steveklabnik/push-lzpqmzmqpuqt branch January 6, 2026 19:24
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