Skip to main content

Module simplify_output

Module simplify_output 

Source
Expand description

Passes that make the output simpler/easier to consume.

Modules§

anon_const_to_call
builtins_to_function_calls
Desugar built-in operations and array/slice indexing to standard library function calls.
duplicate_defaulted_methods
--duplicate-defaulted-methods: copy trait default methods into impls that use them.
filter_trivial_drops
hide_allocator_param
index_intermediate_assigns
This micro-pass introduces intermediate assignments in preparation of crate::transform::simplify_output::builtins_to_function_calls, so as to avoid borrow-checking errors.
inline_selected_functions
lift_associated_item_clauses
Move clauses on non-generic associated types to be implied clauses of the trait. The distinction is not semantically meaningful.
remove_adt_clauses
--remove-adt-clauses strips trait clauses from type declarations when it’s possible to do so. Because it’s not possible to recover associated type information when we remove clauses, we don’t remove clauses if any of them have associated types. For that reason, this flag is best used with --lift-associated-types.
remove_nops
Remove the useless no-ops.
remove_unit_locals
remove_unused_clauses
Remove unused trait clauses from items. A clause is unused if it is only used to build proofs for other unused clauses.
remove_unused_locals
Remove the locals (which are not used for the input arguments) which are never used in the function bodies. This is useful to remove the locals with type Never. We actually check that there are no such local variables remaining afterwards.
simplify_constants
The MIR constant expressions lead to a lot of duplication: there are for instance constant ADTs which duplicate the “regular” aggregated ADTs in the operands, constant references, etc. This reduces the number of cases to handle and eases the function translation in Aeneas.
unbind_item_vars
Replace variables bound at the top-level with Free vars. This is for convenience for consumers of the charon ast.
update_block_indices
Update the block indices to make sure they are consecutive