Skip to content
This repository was archived by the owner on Jun 26, 2020. It is now read-only.
This repository was archived by the owner on Jun 26, 2020. It is now read-only.

Tracking issue for constant folding #554

@lachlansneff

Description

@lachlansneff

This is the tracking issue for minimal constant-folding support. The aim is to collapse code like

v0 = iconst.i32 5
v1 = iconst.i32 37
v2 = iadd v1, v0

into

v2 = iconst.i32 42

and

ebb0:
  v0 = bconst true
  brnz v0, ebb1
  ...
ebb1
  ...

into

ebb0:
  jump ebb1
  ...
ebb1
  ...

Progress:

  • Add constant folding pass

  • Collapse simple operations on constants.

  • Collapse branches when branch can be determined at compile time.

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