sway_ir::optimize

Module fn_dedup

Source
Expand description

§Deduplicate functions.

If two functions are functionally identical, eliminate one and replace all calls to it with a call to the retained one.

This pass shouldn’t be required once the monomorphiser stops generating a new function for each instantiation even when the exact same instantiation exists.

Constants§

FN_DEDUP_DEBUG_PROFILE_NAME
FN_DEDUP_RELEASE_PROFILE_NAME

Functions§

create_fn_dedup_debug_profile_pass
create_fn_dedup_release_profile_pass
dedup_fns