UQ-PAC / BASIL

Apache License 2.0
8 stars 0 forks source link

A new structure to store SSA Sets and to evaluate an SSA fixed point #195

Closed yousifpatti closed 6 months ago

yousifpatti commented 7 months ago

Currently, the SSA directly mutates the Variables by adding the SSA sets which is undesirable. In order to move the Variables to be immutable, a new structure that contains the SSA Sets is needed and is proposed as follows:

Map[CfgNode/Stmt -> Tuple[reads -> Map[Variable, SSA-Set], writes -> KeyValuePair[Variable, SSA-Set]]

Also, a fixed point using a worklist solver is needed to ensure the SSA values are properly propagated and evaluated for loops

ailrst commented 7 months ago

This is probably best implemented as a standard def-use anlayis (section 5.7 https://cs.au.dk/~amoeller/spa/spa.pdf) we can use the defining statement as the definition itself, and simply assign an SSA id to each variable defined at a given unique assign statement.

This means the datastructures are