summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordibyendumajumdar <mobile@majumdar.org.uk>2023-09-17 16:09:37 +0100
committerdibyendumajumdar <mobile@majumdar.org.uk>2023-09-17 16:09:37 +0100
commitd4e6ddb5084c0ef295adad6172e10c664a275260 (patch)
tree75117b93a4c2ccd6c276d1bae532d363d1537d8e
parentadb2ae48c7e92e3a9024b043e476162a11ef9641 (diff)
downloadSimple-d4e6ddb5084c0ef295adad6172e10c664a275260.tar.gz
Simple-d4e6ddb5084c0ef295adad6172e10c664a275260.zip
Initial definition of nodes that will be relevant for chapter 1.
-rw-r--r--chapter01/README.md35
1 files changed, 29 insertions, 6 deletions
diff --git a/chapter01/README.md b/chapter01/README.md
index bb15e828..0dee71be 100644
--- a/chapter01/README.md
+++ b/chapter01/README.md
@@ -56,15 +56,38 @@ There are two types of Nodes in the representation.
The following control and data nodes will be created in this chapter.
-| Node Name | Type | Description | Inputs | Value |
-| --- | --- |------------------------|--------------------------------------------|-------------------------------------------------------|
-| Start | Control | Start of function | None | None for now as we do not have function arguments yet |
-| Region | Control | Represent a Basic Block | Predecessor control nodes in the CFG | Each region represents one value |
-| Return | Control | Represents the termination of a function | Predecessor control node, Data value node | Return value of the function |
-| Constant | Data | Represents constants such as integer literals | None | Value of the constant |
+| Node Name | Type | Description | Inputs | Value |
+|-----------|---------|-----------------------------------------------|-------------------------------------------|-------------------------------------------------------|
+| Start | Control | Start of function | None | None for now as we do not have function arguments yet |
+| Region | Control | Represent a Basic Block | Predecessor control nodes in the CFG | Each region represents one value |
+| Return | Control | Represents the termination of a function | Predecessor control node, Data node value | Return value of the function |
+| Constant | Data | Represents constants such as integer literals | None | Value of the constant |
All control nodes will implement a marker interface named `Control`.
Within a traditional basic block, instructions are executed in sequence. In the Sea of Nodes model, the correct sequence of instruction within a
region will be determined by a scheduling algorithm, to be discussed in later chapters.
+### Unique Node ID
+
+Each node will be assigned a unique Node ID upon creation. The Node ID will be allocated in a particular compilation context.
+
+### Node Comparisons
+
+Nodes will by default be compared such that two nodes are equal if they have the same class type, and if all input nodes have the same Node ID.
+
+### Start Node
+
+TODO
+
+### Region Node
+
+TODO
+
+### Return Node
+
+TODO
+
+### Constant Node
+
+TODO \ No newline at end of file