MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / count_local_id_uses

Function count_local_id_uses

src/transform/src/normalize_lets.rs:240–245  ·  view source on GitHub ↗

Populates `counts` with the number of uses of each local identifier in `expr`.

(
        expr: &MirRelationExpr,
        counts: &mut std::collections::BTreeMap<LocalId, usize>,
    )

Source from the content-addressed store, hash-verified

238
239 /// Populates `counts` with the number of uses of each local identifier in `expr`.
240 pub(super) fn count_local_id_uses(
241 expr: &MirRelationExpr,
242 counts: &mut std::collections::BTreeMap<LocalId, usize>,
243 ) {
244 for_local_id(expr, |i| *counts.entry(i).or_insert(0) += 1)
245 }
246
247 /// Visit `LetRec` stages and determine and update type information for `Get` nodes.
248 ///

Callers 2

harvest_non_recursiveFunction · 0.85
inline_lets_coreFunction · 0.85

Calls 2

for_local_idFunction · 0.85
entryMethod · 0.45

Tested by

no test coverage detected