Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compiler: beam_ssa_ss: Enforce cutoff for list literals #8162

Merged
merged 1 commit into from
Feb 22, 2024

Commits on Feb 20, 2024

  1. compiler: beam_ssa_ss: Enforce cutoff for list literals

    The alias analysis pass tracks the structure and aliasing status of
    values given as arguments and returned from functions. The information
    is kept in the graph provided by the beam_ssa_ss module and is built
    when the alias analysis processes instructions constructing
    terms. When a literal is given as an argument to a function, the graph
    is extended to have the same structure as if the literal was
    constructed programmatically.
    
    To handle self-recursive functions which, for example builds a list,
    there is a cutoff which limits the depth to which the graph is
    constructed. This allows a fixpoint to be reached without implementing
    a solver for recurrence equations about the structure of the
    arguments, but also limits the size of the graph.
    
    This patch corrects an omission in the beam_ssa_ss:merge_in_arg/4
    function where the cutoff was not enforced for list literals.
    
    Closes erlang#8140
    frej committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    7e5f7b2 View commit details
    Browse the repository at this point in the history