Skip to content

Unpack TCO loops #18

@natefaubion

Description

@natefaubion

It would be nice to unpack TCO loops, such that TCO arguments that are always known constructors don't need allocations. This would give us something comparable to call-pattern-specialization in the TCO pass. We essentially already do this for mutually recursive TCO bindings, as a special case.

It doesn't strictly need to be a TCO pass, as it would obviously be nice to have this even when the backend doesn't need TCO. It just seems like a straightforward extension for now.

Additionally, by doing it as part of codegen, we can avoid an explosion of specialized bindings (one for every specialization of constructors).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions