diff options
author | John Hodge <tpg@mutabah.net> | 2016-08-21 21:29:24 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-08-21 21:29:24 +0800 |
commit | b35d2d5609ede90bc9204db539c81adf20fec8d1 (patch) | |
tree | 41843003a6e05654c443a4aeef193dbd5e3594b5 | |
parent | a165d0f4bb16d3bb8a15620604fb476c94c0ea14 (diff) | |
download | mrust-b35d2d5609ede90bc9204db539c81adf20fec8d1.tar.gz |
Notes MIR - Validation and optimisation notes
-rw-r--r-- | Notes/MIR.md | 18 |
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 |