Commit Graph

6 Commits

Author SHA1 Message Date
Tomasz Miąsko
e1e48ae29b simplify-locals: Change RemoveStatements visitor into a function
No functionl changes intended.
2020-10-26 10:33:45 +01:00
Tomasz Miąsko
a6b64be8b5 simplify-locals: Unify use count visitors
The simplify locals implementation uses two different visitors to update
the locals use counts. The DeclMarker calculates the initial use counts.
The StatementDeclMarker updates the use counts as statements are being
removed from the block.

Replace them with a single visitor that can operate in either mode,
ensuring consistency of behaviour.

Additionally use exhaustive match to clarify what is being optimized.

No functional changes intended.
2020-10-26 10:33:39 +01:00
Tomasz Miąsko
11269536e2 simplify-locals: Represent use counts with u32 2020-10-26 10:33:31 +01:00
Dylan MacKenzie
6f61e71648 Remember the MirSource for each Body 2020-10-04 11:01:38 -07:00
Matthias Krüger
40dddd3305 use matches!() macro for simple if let conditions 2020-09-18 20:28:35 +02:00
mark
9e5f7d5631 mv compiler to compiler/ 2020-08-30 18:45:07 +03:00