diff options
author | John Hodge <tpg@mutabah.net> | 2016-12-18 11:30:08 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-12-18 11:31:04 +0800 |
commit | f06d01f899a58e2f5c4207d8def237872f40a47e (patch) | |
tree | 7cd6c07e940cfac3afd769eeae44e135f062bc65 /src/mir/optimise.cpp | |
parent | 048e53fa011bc09ae24bbb0ee3fcb4f8105959f1 (diff) | |
download | mrust-f06d01f899a58e2f5c4207d8def237872f40a47e.tar.gz |
HIR - Move VTable construction to codegen
Diffstat (limited to 'src/mir/optimise.cpp')
-rw-r--r-- | src/mir/optimise.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mir/optimise.cpp b/src/mir/optimise.cpp index f877ab88..601b1b18 100644 --- a/src/mir/optimise.cpp +++ b/src/mir/optimise.cpp @@ -134,6 +134,8 @@ void MIR_Optimise(const StaticTraitResolve& resolve, const ::HIR::ItemPath& path // >> Propagate dead assignments // TODO: This requires kowing that doing so has no effect. // - Can use little heristics like a Call pointing to an assignment of its RV + // - Count the read/write count of a variable, if it's 1,1 then this optimisation is correct. + // - If the count is read=*,write=1 and the write is of an argument, replace with the argument. // GC pass on blocks and variables // - Find unused blocks, then delete and rewrite all references. |