Skip to content

Support SSA #39

@cd1m0

Description

@cd1m0

This requires several things:

  1. Add support for SSA in maru-ir:
    1.1 Add phi() nodes
    1.2 Add a "isSSA(p: Program): boolean" function
    1.3 Add a toSSA(p: Program): [Program, Map<Identifier, Identifier>] that converts a program to SSA form, and emits an auxiliary map from the original Identifiers in the program to their SSA equivalents. Since identifiers are unique objects, this is a 1-1 map.
    1.4. Add a test for each sample in maru-ir2, that after its converted to SSA (toSSA is called), it is indeed in SSA form (isSSA is true), and that it executes with the same result as before. (Note that we have to be careful so that the src fields of the ssa nodes preserve the src fields of the original nodes. This should be mostly trivial, except for phi nodes)

  2. Use toSSA in sol2maruir

Depends on #37

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions