summaryrefslogtreecommitdiff
path: root/Notes/MIR.md
diff options
context:
space:
mode:
Diffstat (limited to 'Notes/MIR.md')
-rw-r--r--Notes/MIR.md18
1 files changed, 18 insertions, 0 deletions
diff --git a/Notes/MIR.md b/Notes/MIR.md
index 4357d764..88b5e888 100644
--- a/Notes/MIR.md
+++ b/Notes/MIR.md
@@ -64,3 +64,21 @@ Drop Scopes
- Scopes contain child scopes (started within them)
- Special named scope for the entire function.
- For match, scope handles can be passed around
+
+
+Validation
+----------
+- [CFA] All code paths from bb0 must end with either a return or a diverge (or loop)
+- [ValState] No drops or usage of uninitalised values (Uninit, Moved, or Dropped)
+- [ValState] Temporaries are write-once.
+ - Requires maintaining state information for all variables/temporaries with support for loops
+- [Flat] Types must be valid (correct type for slot etc.)
+ - Simple check of all assignments/calls/...
+
+Optimisiation
+-------------
+- Constant propagation
+- Dead code
+- Useless assignments
+- Basic-block chaining
+- De-duplication