live_variables: Live Variables Analysis

View source: R/live_variables.R

live_variablesR Documentation

Live Variables Analysis

Description

Given code in basic blocks, this function computes the live variables at the exit (and optionally, the entry) of each block.

Usage

live_variables(node, cfg = compute_cfg(node), du = def_use_sets(node,
  by_block = TRUE, only_undefined_uses = TRUE), ...)

Arguments

node

The Function or BlockList to analyze.

cfg

(igraph) The control flow graph for the given code.

du

(list) Definition and use sets for each block, as computed by def_use_sets().

...

Additional arguments to backward_analysis().

Details

A variable is live if it has already been defined and it will be used in some subsequent block.

Value

The solution returned by backward_analysis().


nick-ulle/ast documentation built on May 14, 2024, 7:40 p.m.