Expand description
§pliron: Programming Languages Intermediate RepresentatiON
pliron is an extensible compiler IR framework, inspired by MLIR
and written in safe Rust.
Modules§
- Attributes are non-SSA data stored in Operations.
- A BasicBlock is a list of Operations.
- Utilities for attaching / retrieving debug info to / from the IR.
- IR and control-flow-graph utilities
- Identifiers are strings used to name entities in programming languages.
- IR printing and parsing utilities
- Provide linked-list operations for
Ptr<T: LinkedList>. - Source location for different IR entities
- An operation is the basic unit of execution in the IR. The general idea is similar to MLIR’s Operation
- IR objects that can be parsed from their text representation.
- IR objects that are to be printed must implement Printable.
- Regions are containers for BasicBlocks within an Operation.
- Utilities for error handling
- Store unique instances of a rust type.
- Every SSA value, such as operation results or block arguments has a type defined by the type system.
- Store, in Context, a single unique copy of any object.
- Use-Def and Def-Use Graph.
- Independent support tools / utilities
Macros§
- Create ErrorKind::InvalidArgument Result from any std::error::Error object. To create Error, use arg_error! instead. The macro also accepts format! like arguments to create one-off errors.
- Same as arg_err but when no location is known.
- Create ErrorKind::InvalidArgument Error from any std::error::Error object. To create Result, use arg_err! instead. The macro also accepts format! like arguments to create one-off errors.
- Same as arg_error but when no location is known.
- Specify ErrorKind and create Result from any std::error::Error object. To create Error, use create_error! instead. The macro also accepts format! like arguments to create one-off errors. It may be shorter to just use verify_err!, input_err! or arg_err! instead.
- Specify ErrorKind and create Error from any std::error::Error object. To create Result, use create_err! instead. The macro also accepts format! like arguments to create one-off errors. It may be shorter to just use verify_error!, input_error! or arg_error! instead.
- Implement an Attribute Interface for an Attribute. The interface trait must define a
verifyfunction with type AttrInterfaceVerifier. - Implement an Op Interface for an Op. The interface trait must define a
verifyfunction with type OpInterfaceVerifier - Implement a Type Interface for a Type. The interface trait must define a
verifyfunction with type TypeInterfaceVerifier. - Sugar to implement a verifier that always succeeds. Usage:
- All statements in the block are indented during fmt. Simply wraps the block with State::push_indent and State::pop_indent.
- Create ErrorKind::InvalidInput Result from any std::error::Error object. To create Error, use input_error! instead. The macro also accepts format! like arguments to create one-off errors.
- Same as input_err but when no location is known.
- Create ErrorKind::InvalidInput Error from any std::error::Error object. To create Result, use input_err! instead. The macro also accepts format! like arguments to create one-off errors.
- Same as input_error but when no location is known.
- Specify that a type may be casted to a
dyn Traitobject. Use any_to_trait for the actual cast. Example: - Create ErrorKind::VerificationFailed Result from any std::error::Error object. To create Error, use verify_error! instead. The macro also accepts format! like arguments to create one-off errors.
- Same as verify_err but when no location is known.
- To create Result, use verify_err! instead. The macro also accepts format! like arguments to create one-off errors.
- Same as verify_error but when no location is known.
Structs§
- A value which is initialized on the first access.