Skip to content

Make more robust SSA for trace IR #14

@JakeEhrlich

Description

@JakeEhrlich

It turns out that for many reasons, it would be nice to have basic blocks in our SSA and represent loops more explicitly. For instance a nice optimization is to unroll the outer loop for just one iteration and this gives you substantial type information that you can use going into next loop if you can for instance prove that a phi node is always of a certain type.

Additionally this sets us up later for adding branches for 50/50 cases that are not handled well by the naive tracing we do now. Lastly this also sets us up for TraceMonkey style trace appending where traces are stored for each branch and then they are periodically recompiled.

This is also what we need to handle tail calls as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions