rust/src
bors a7f375789b Auto merge of #91840 - JakobDegen:fix_early_otherwise, r=oli-obk
Fix the unsoundness in the `early_otherwise_branch` mir opt pass

Closes #78496 .

This change is a significant rewrite of much of the pass. Exactly what it does is documented in the source file (with ascii art!), and all the changes that are made to the MIR that are not trivially sound are carefully documented. That being said, this is my first time touching MIR, so there are probably some invariants I did not know about that I broke.

This version of the optimization is also somewhat more flexible than the original; for example, we do not care how or where the value on which the parent is switching is computed. There is no requirement that any types be the same. This could be made even more flexible in the future by allowing a wider range of statements in the bodies of `BBC, BBD` (as long as they are all the same of course). This should be a good first step though.

Probably needs a perf run.

r? `@oli-obk` who reviewed things the last time this was touched
2022-01-26 12:10:54 +00:00
..
bootstrap Auto merge of #93047 - matthiaskrgr:defer__dist_PlainSourceTarball, r=Mark-Simulacrum 2022-01-23 12:29:08 +00:00
build_helper Remove dead code from build_helper 2022-01-22 12:06:44 +01:00
ci Auto merge of #92983 - pietroalbini:pa-bump-runner-images, r=Mark-Simulacrum 2022-01-21 17:43:39 +00:00
doc Rollup merge of #93219 - cr1901:msp430-asm-squashed, r=Amanieu 2022-01-23 20:13:04 +01:00
etc Auto merge of #87648 - JulianKnodt:const_eq_constrain, r=oli-obk 2022-01-18 09:58:39 +00:00
librustdoc Auto merge of #88679 - petrochenkov:doctrscope, r=GuillaumeGomez 2022-01-26 09:10:27 +00:00
llvm-project@6b3dbcc81a Use Term in ProjectionPredicate 2022-01-17 17:44:56 +00:00
rustdoc-json-types Increase the format version of rustdoc-json-types 2022-01-20 22:14:02 +01:00
test Auto merge of #91840 - JakobDegen:fix_early_otherwise, r=oli-obk 2022-01-26 12:10:54 +00:00
tools Update cargo 2022-01-25 16:24:21 -08:00
README.md
stage0.json
version

This directory contains the source code of the rust project, including:

  • The test suite
  • The bootstrapping build system
  • Various submodules for tools, like rustdoc, rls, etc.

For more information on how various parts of the compiler work, see the rustc dev guide.