Uh oh!
There was an error while loading. Please reload this page.
Create const block DefIds in typeck instead of ast lowering - #124650
Conversation
rustbot
commented
May 3, 2024
Some changes occurred in match checking cc @Nadrieril Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt Changes to the size of AST and/or HIR nodes. cc @nnethercote |
oli-obk
commented
May 3, 2024
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
Create const block DefIds in typeck instead of ast lowering r? `@ghost` this is a prerequisite for cleaning up pattern types and the range pattern HIR nodes in general. Right now they contain expressions, but they are supposed to only contain constants. In order to generate the anonymous constants lazily during typeck, we need to support generating new items with bodies during typeck in general. Transforming const blocks was the simplest change I could find to allow us to do that (everything else is much more invasive if we haven't already done it for const blocks).
bors
commented
May 3, 2024
Uh oh!
There was an error while loading. Please reload this page.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
bors
commented
May 3, 2024
💔 Test failed - checks-actions |
bors
commented
May 4, 2024
☔ The latest upstream changes (presumably #124401) made this pull request unmergeable. Please resolve the merge conflicts. |
…-params, r=spastorino Pattern types: Prohibit generic args on const params Addresses https://github.com/rust-lang/rust/pull/123689/files#r1562676629. NB: Technically speaking, *not* prohibiting generics args on const params is not a bug as `pattern_types` is an *internal* feature and as such any uncaught misuses of it are considered to be the fault of the user. However, permitting this makes me slightly uncomfortable esp. since we might want to make pattern types available to the public at some point and I don't want this oversight to be able to slip into the language (for comparison, ICEs triggered by the use of internal features are like super fine). Furthermore, this is an ad hoc fix. A more general fix would be changing the representation of the pattern part of pattern types in such a way that it can reuse preexisting lowering routines for exprs / anon consts. See also this [Zulip discussion](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/pattern.20type.20HIR.20nodes/near/432410768) and rust-lang#124650. Also note that we currently don't properly typeck the pattern of pat tys. This however is out of scope for this PR. cc `@oli-obk` r? `@spastorino` as discussed
edb59c9 to
96380e0Comparerustbot
commented
May 22, 2024
Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
96380e0 to
8d59f8bCompareoli-obk
commented
May 22, 2024
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
bors
commented
May 22, 2024
Create const block DefIds in typeck instead of ast lowering r? `@ghost` this is a prerequisite for cleaning up pattern types and the range pattern HIR nodes in general. Right now they contain expressions, but they are supposed to only contain constants. In order to generate the anonymous constants lazily during typeck, we need to support generating new items with bodies during typeck in general. Transforming const blocks was the simplest change I could find to allow us to do that (everything else is much more invasive if we haven't already done it for const blocks).
This comment has been minimized.
This comment has been minimized.
bors
commented
May 22, 2024
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
8d59f8b to
520c8e7Compare
This comment has been minimized.
This comment has been minimized.
rust-timer
commented
May 22, 2024
Finished benchmarking commit (bbdee60): comparison URL. Overall result: ❌✅ regressions and improvements - ACTION NEEDEDBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)Results (primary 1.4%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResults (primary 1.8%, secondary 4.9%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 672.666s -> 672.469s (-0.03%) |
bors
commented
May 28, 2024
bors
commented
May 28, 2024
bors
commented
May 28, 2024
☀️ Test successful - checks-actions |
rust-timer
commented
May 28, 2024
Finished benchmarking commit (7717a30): comparison URL. Overall result: ❌✅ regressions and improvements - ACTION NEEDEDNext Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)Results (primary 1.1%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResults (primary -1.7%, secondary 2.6%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 669.563s -> 669.344s (-0.03%) |
lqd
commented
May 28, 2024
Tiny changes, and overall more gains than losses, probably not worth investigation effort imho. |
…r-errors Reintroduce name resolution check for trying to access locals from an inline const fixesrust-lang#125676 I removed this without replacement in rust-lang#124650 without considering the consequences
…r-errors Reintroduce name resolution check for trying to access locals from an inline const fixesrust-lang#125676 I removed this without replacement in rust-lang#124650 without considering the consequences
Rollup merge of rust-lang#125705 - oli-obk:const_block_ice, r=compiler-errors Reintroduce name resolution check for trying to access locals from an inline const fixesrust-lang#125676 I removed this without replacement in rust-lang#124650 without considering the consequences
…r-errors Revert: create const block bodies in typeck via query feeding as per the discussion in rust-lang#125806 (comment) It was a mistake to try to shoehorn const blocks and some specific anon consts into the same box and feed them during typeck. It turned out not simplifying anything (my hope was that we could feed `type_of` to start avoiding the huge HIR matcher, but that didn't work out), but instead making a few things more fragile. reverts the const-block-specific parts of rust-lang#124650 `@bors` rollup=never had a small perf impact previously fixesrust-lang#125846 r? `@compiler-errors`
…r-errors Revert: create const block bodies in typeck via query feeding as per the discussion in rust-lang#125806 (comment) It was a mistake to try to shoehorn const blocks and some specific anon consts into the same box and feed them during typeck. It turned out not simplifying anything (my hope was that we could feed `type_of` to start avoiding the huge HIR matcher, but that didn't work out), but instead making a few things more fragile. reverts the const-block-specific parts of rust-lang#124650 ``@bors`` rollup=never had a small perf impact previously fixesrust-lang#125846 r? ``@compiler-errors``
pnkfelix
commented
Jun 4, 2024
@rustbot label: +perf-regression-triaged |
…r-errors Revert: create const block bodies in typeck via query feeding as per the discussion in rust-lang#125806 (comment) It was a mistake to try to shoehorn const blocks and some specific anon consts into the same box and feed them during typeck. It turned out not simplifying anything (my hope was that we could feed `type_of` to start avoiding the huge HIR matcher, but that didn't work out), but instead making a few things more fragile. reverts the const-block-specific parts of rust-lang#124650 ```@bors``` rollup=never had a small perf impact previously fixesrust-lang#125846 r? ```@compiler-errors```
…errors Revert: create const block bodies in typeck via query feeding as per the discussion in rust-lang#125806 (comment) It was a mistake to try to shoehorn const blocks and some specific anon consts into the same box and feed them during typeck. It turned out not simplifying anything (my hope was that we could feed `type_of` to start avoiding the huge HIR matcher, but that didn't work out), but instead making a few things more fragile. reverts the const-block-specific parts of rust-lang#124650 `@bors` rollup=never had a small perf impact previously fixesrust-lang#125846 r? `@compiler-errors`
…errors Revert: create const block bodies in typeck via query feeding as per the discussion in rust-lang#125806 (comment) It was a mistake to try to shoehorn const blocks and some specific anon consts into the same box and feed them during typeck. It turned out not simplifying anything (my hope was that we could feed `type_of` to start avoiding the huge HIR matcher, but that didn't work out), but instead making a few things more fragile. reverts the const-block-specific parts of rust-lang#124650 `@bors` rollup=never had a small perf impact previously fixesrust-lang#125846 r? `@compiler-errors`
Revert: create const block bodies in typeck via query feeding as per the discussion in rust-lang/rust#125806 (comment) It was a mistake to try to shoehorn const blocks and some specific anon consts into the same box and feed them during typeck. It turned out not simplifying anything (my hope was that we could feed `type_of` to start avoiding the huge HIR matcher, but that didn't work out), but instead making a few things more fragile. reverts the const-block-specific parts of rust-lang/rust#124650 `@bors` rollup=never had a small perf impact previously fixesrust-lang/rust#125846 r? `@compiler-errors`
Revert: create const block bodies in typeck via query feeding as per the discussion in rust-lang/rust#125806 (comment) It was a mistake to try to shoehorn const blocks and some specific anon consts into the same box and feed them during typeck. It turned out not simplifying anything (my hope was that we could feed `type_of` to start avoiding the huge HIR matcher, but that didn't work out), but instead making a few things more fragile. reverts the const-block-specific parts of rust-lang/rust#124650 `@bors` rollup=never had a small perf impact previously fixesrust-lang/rust#125846 r? `@compiler-errors`
this is a prerequisite for cleaning up pattern types and the range pattern HIR nodes in general. Right now they contain expressions, but they are supposed to only contain constants. In order to generate the anonymous constants lazily during typeck, we need to support generating new items with bodies during typeck in general. Transforming const blocks was the simplest change I could find to allow us to do that (everything else is much more invasive if we haven't already done it for const blocks).