<commit_before>TODO:
- Get all run-pass and run-fail tests passing resolve
 - Lots of fixes to do here
- Audit TODOs in codebase
- MIR Optimisations
 - Dead code eliminiation
 - Remove variables that are just assigned from arguments
- Convert enum variants to point to structs for the data type
 - Four types of variants: Unit, Value, Tuple1, Composite
  - TODO: Have value enums be a different structure to data enums
  - Tuple1 is a special case to reduce the cost of Some/Ok/Err/...
 - This may have to wait for a rustc RFC? (or can hide the structs for now)
- Clean up Span code to correctly handle nested spans
- Clean up AST
 - Almost done, just a few little niggles left
- Split arg patterns and arg types up for cleaner serialisation
 - Could be a good idea to do as part of changing HIR::TraitImpl to only contain the impl data
 - May not be too useful due to argument monomorphisation.
- Optimise typecheck.


- MIR: Unify Variable/Argument/Temporary LValue types
 - This should reduce the amount of code needed for validation, but will be a
   BIG change.



## Optimisations
- Argument propagation: replace assignments from Argument(_) if target is only
  written once
- Dead assignment removal (Delete `<val> = Use(<val>)`
- Tuple destructure removal
 - Spot `#1 = (...,)`, `#2 = (#1).n` where #1 is Write-once, borrow-none

<commit_msg>Notes - New todo list (little and big changes)<commit_after>TODO:
- Get all run-pass and run-fail tests passing resolve
 - Lots of fixes to do here
- Audit TODOs in codebase
- MIR Optimisations
 - Remove variables that are just assigned from arguments
- Convert enum variants to point to structs for the data type
 - Four types of variants: Unit, Value, Tuple1, Composite
  - TODO: Have value enums be a different structure to data enums
  - Tuple1 is a special case to reduce the cost of Some/Ok/Err/...
 - This may have to wait for a rustc RFC? (or can hide the structs for now)
- Clean up Span code to correctly handle nested spans
- Clean up AST
 - Almost done, just a few little niggles left
- Split arg patterns and arg types up for cleaner serialisation
 - Could be a good idea to do as part of changing HIR::TraitImpl to only contain the impl data
 - May not be too useful due to argument monomorphisation.
- Optimise typecheck.


## Big change TODOs
- Enum variant types
- SwitchValue
- Support MIR-only RLibs
- Fix Span annotations
- Refactor parse to use a consume model lexer
- Optimise optimise (and typecheck)
- Complete structed C codegen

## Smaller changes
- Only generate destructors if needed (removes C warnings)
- Add `-j` support to minicargo
- Cache specialisation tree
- Dependency files from mrustc
- Allow disabling C codegen (and/or emitting a makefile stub for it)
- Simplified C code (remove useless BB labels)


## Optimisations
- Argument propagation: replace assignments from Argument(_) if target is only
  written once
- Dead assignment removal (Delete `<val> = Use(<val>)`
- Tuple destructure removal
 - Spot `#1 = (...,)`, `#2 = (#1).n` where #1 is Write-once, borrow-none


{'fraction_non_alphanumeric': 0.06830065359477124, 'fraction_numerical': 0.00392156862745098, 'mean_word_length': 3.596096096096096, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1248561', 'n_tokens_mistral': 880, 'n_tokens_neox': 839, 'n_words': 452}