LIR: Low-Level Intermediate Representation

LIR stands for “Low-Level Intermediate Representation”

Difference between HIR and LIR:

A valid LIR program is a valid HIR program that in addition verifies the following constraints:

  • No nested seq:

    The HIR tree must be flattened in a single thread of execution. Therefore, there must be at most one seq per function.

  • No eseq:

    Similarly, the instruction eseq must not be used.

  • No nested call:

    Calls cannot be embedded within other calls. Actually, the restriction is even stronger than this: a call can only appear in the following patterns:

    move dest call ...

    A function call.

    sxp call ...

    A procedure call.

  • One way cjump:

    cjumps must be normalized in such a way that they are always followed by their negative destination.