Skip to main content

build_function_info

Function build_function_info 

Source
fn build_function_info(
    tcx: TyCtxt<'_>,
    def_id: DefId,
    local_base: usize,
) -> (Vec<BlockConstantInfo>, DiscriminantInfo, FxHashMap<usize, usize>, FxHashMap<usize, usize>, FxHashMap<usize, usize>)
Expand description

Scan a function’s MIR and collect its per-block constant/discriminant metadata and global source maps, remapping every MIR local l to local_base + l. The root caller uses base 0; inlined callees use a fresh base so their locals never collide with the caller’s in the flat constraint maps (see PathGraph::local_bases).