Crate cranelift_isle

Source
Expand description

§ISLE: Instruction Selection / Lowering Expressions

ISLE is a domain specific language (DSL) for instruction selection and lowering clif instructions to vcode’s MachInsts in Cranelift.

ISLE is a statically-typed term-rewriting language. You define rewriting rules that map input terms (clif instructions) into output terms (MachInsts). These rules get compiled down into Rust source test that uses a tree of match expressions that is as good or better than what you would have written by hand.

Modules§

ast
Abstract syntax tree (AST) created from parsed ISLE.
codegen
Generate Rust code from a series of Sequences.
compile
Compilation process, from AST to Sema to Sequences of Insts.
disjointsets
Implementation of DisjointSets, to store disjoint sets and provide efficient operations to merge sets
error
Error types.
files
lexer
Lexer for the ISLE language.
overlap
Overlap detection for rules in ISLE.
parser
Parser for ISLE language.
sema
Semantic analysis.
serialize
Put “sea of nodes” representation of a RuleSet into a sequential order.
stablemapset
Implementations of hashmap and hashset that asvoid observing non-determinism in iteration order. In a separate module so the compiler can prevent access to the internal implementation details.
trie_again
A strongly-normalizing intermediate representation for ISLE rules. This representation is chosen to closely reflect the operations we can implement in Rust, to make code generation easy.

Macros§

log
Log a compiler-internal message for debugging purposes.