Ortal1993 / compilation-project

0 stars 0 forks source link

Discussion - Classifying nodes. #4

Closed AdiHarif closed 1 year ago

AdiHarif commented 1 year ago

Clssifying nodes will probably be helpful. For example, we would like to distinguish between data nodes and control flow nodes. Some types of nodes will be easier to classify - constants and params are data nodes, entry point, if, return are flow. It is up for us to decide about other nodes how should we treat them. Are operators considered data or flow? Do we need other classes?

AdiHarif commented 1 year ago

As we determined in our meetings here is a brief segregation of nodes into classes:

Control nodes:

  1. entry points (of top level\functions)
  2. returns
  3. function calls
  4. if\while entries
  5. load\store
  6. merge nodes

Data nodes:

  1. constants
  2. function parameters
  3. operators
  4. static symbols i.e. field\function names (marked with #)
  5. phi nodes