Skip to main content

Module select

Module select 

Source
Expand description

Matching a target’s lowering rules against a term.

Design: spec/10-backend.md section 10.2. The rules themselves are in rules/, one file per target, and the automaton they compile into is generated by rucc-rules when this crate is built.

The walk over that automaton is rucc_base::rules, because rucc-opt matches IR against a table of rewrite rules with the same walk and neither crate can see the other. What is here is which targets there are and the tests that the x86-64 table lowers what it should. The AArch64 table has its own tests beside it.

The names are re-exported rather than reached for through rucc_base, because the generated file refers to them through super and that is the whole of the contract between the two.

Modules§

aarch64
The AArch64 lowering table.
x86_64
The x86-64 lowering table.

Structs§

Jumps
The instructions a place in this function is reached with: the address of a block or a jump table, and the read of one cell of a table and the add that turns it back into an address.
Match
What a successful match found.
Node
One node of the trie over the patterns.
Rule
One rule, as much of it as matching needs.
Selector
What crate::lower has to know about the machine it selects instructions for.
Symbols
The two ways the address of a symbol is come by.
Table
A set of rules, as an automaton over their patterns.

Enums§

Piece
One piece of a replacement, in the pre-order that builds it.
Pointer
Where the thread pointer is read from.
Reach
One instruction that puts the address of a symbol in a register, and where it carries the symbol.

Traits§

Subject
The bits of a term the automaton asks about.

Type Aliases§

Guard
A condition on the constants a pattern matched.