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]
)
| 346 | |
| 347 | |
| 348 | def 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 | |
| 365 | def analyze_must_defined_regs( |
nothing calls this directly
no test coverage detected
searching dependent graphs…