MCPcopy Create free account
hub / github.com/python/mypy / analyze_maybe_defined_regs

Function analyze_maybe_defined_regs

mypyc/analysis/dataflow.py:348–362  ·  view source on GitHub ↗

Calculate potentially defined registers at each CFG location. A register is defined if it has a value along some path from the initial location.

(
    blocks: list[BasicBlock], cfg: CFG, initial_defined: set[Value]
)

Source from the content-addressed store, hash-verified

346
347
348def analyze_maybe_defined_regs(
349 blocks: list[BasicBlock], cfg: CFG, initial_defined: set[Value]
350) -> AnalysisResult[Value]:
351 """Calculate potentially defined registers at each CFG location.
352
353 A register is defined if it has a value along some path from the initial location.
354 """
355 return run_analysis(
356 blocks=blocks,
357 cfg=cfg,
358 gen_and_kill=DefinedVisitor(),
359 initial=initial_defined,
360 backward=False,
361 kind=MAYBE_ANALYSIS,
362 )
363
364
365def analyze_must_defined_regs(

Callers

nothing calls this directly

Calls 2

run_analysisFunction · 0.85
DefinedVisitorClass · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…