Crate midenc_hir_transform

Source

Structs§

Canonicalizer
This pass performs various types of canonicalizations over a set of operations by iteratively applying the canonicalization patterns of all loaded dialects until either a fixpoint is reached or the maximum number of iterations/rewrites is exhausted. Canonicalization is best-effort and does not guarantee that the entire IR is in a canonical form after running this pass.
ControlFlowSink
This transformation sinks operations as close as possible to their uses, one of two ways:
SinkOperandDefs
This transformation sinks constants as close as possible to their uses, one of two ways:
SparseConditionalConstantPropagation
This pass implements a general algorithm for sparse conditional constant propagation.

Traits§

CFGToSCFInterface
This trait is used to abstract over the dialect-specific aspects of the control flow lifting transformation performed by transform_cfg_to_scf.
ReloadLike
An operation trait for operations that implement reload-like behavior for purposes of the spills transformation/rewrite.
SpillLike
An operation trait for operations that implement spill-like behavior for purposes of the spills transformation/rewrite.
TransformSpillsInterface
This interface is used in conjunction with transform_spills so that the transform can be used with any dialect, and more importantly, avoids forming a dependency on our own dialects for the subset of operations we need to emit/rewrite.

Functions§

transform_cfg_to_scf
This function transforms all unstructured control flow operations within region, to equivalent structured control flow operations.
transform_spills
This transformation rewrites op by applying the results of the provided SpillAnalysis, using the provided implementation of the TransformSpillsInterface.