granite-rust/src
bors 7aa413d592 Auto merge of #107921 - cjgillot:codegen-overflow-check, r=tmiasko
Make codegen choose whether to emit overflow checks

ConstProp and DataflowConstProp currently have a specific code path not to propagate constants when they overflow. This is meant to have the correct behaviour when inlining from a crate with overflow checks (like `core`) into a crate compiled without.

This PR shifts the behaviour change to the `Assert(Overflow*)` MIR terminators: if the crate is compiled without overflow checks, just skip emitting the assertions. This is already what happens with `OverflowNeg`.

This allows ConstProp and DataflowConstProp to transform `CheckedBinaryOp(Add, u8::MAX, 1)` into `const (0, true)`, and let codegen ignore the `true`.

 The interpreter is modified to conform to this behaviour.

Fixes #35310
2023-02-19 18:17:26 +00:00
..
bootstrap Rollup merge of #108212 - KittyBorgX:master, r=jyn514 2023-02-19 14:47:57 +01:00
ci Rollup merge of #107733 - Kobzol:opt-build-metrics, r=Mark-Simulacrum 2023-02-14 18:24:41 +01:00
doc Auto merge of #99679 - repnop:kernel-address-sanitizer, r=cuviper 2023-02-18 03:05:11 +00:00
etc Change src/etc/vscode_settings.json to always treat ./library as the sysroot source 2023-02-17 15:18:09 -06:00
librustdoc Rollup merge of #108129 - GuillaumeGomez:correctly-handle-links-starting-with-whitespace, r=petrochenkov 2023-02-19 14:47:55 +01:00
llvm-project@477e7285b1 Pull in more LLVM commits 2023-01-20 07:48:59 -08:00
rustdoc-json-types Rustdoc-Json: Report discriminant on all kinds of enum variant. 2023-01-01 19:48:26 +00:00
tools Rename checked_binop_checks_overflow. 2023-02-18 21:35:02 +00:00
README.md Remove stale reference to the test suite location 2023-01-13 11:49:06 +00:00
stage0.json Download rustc component for rustfmt toolchain as well 2023-01-31 10:29:33 -05:00
version Bump to 1.69.0 2023-01-20 18:06:54 -05:00

This directory contains some source code for the Rust project, including:

  • The bootstrapping build system
  • Various submodules for tools, like cargo, tidy, etc.

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