Uh oh!
There was an error while loading. Please reload this page.
Add query to check for impossible predicates, use it to skip NoopMethodCall and Inline - #95398
Add query to check for impossible predicates, use it to skip NoopMethodCall and Inline#95398compiler-errors wants to merge 2 commits into
NoopMethodCall and Inline#95398Conversation
rust-highfive
commented
Mar 28, 2022
(rust-highfive has picked a reviewer for you, use r? to override) |
bors
commented
Mar 31, 2022
☔ The latest upstream changes (presumably #95436) made this pull request unmergeable. Please resolve the merge conflicts. |
825eafa to
9436ebeCompare
cjgillot
left a comment
There was a problem hiding this comment.
The query you created makes it seem like having impossible predicates is a property of an item. Should this check be done earlier, ie. at the beginning of typeck, in order to skip all the work of type checking and MIR building?
There was a problem hiding this comment.
Could you rename the query to make the bool more explicit?
Something like item_has_impossible_predicates?
compiler-errors
commented
Apr 1, 2022
Yes, I agree that it's a property of the where clause on an item. However, they are allowed on the item with The current behavior is to typecheck the items as if these predicates are true. I think we should at least continue to typecheck the items given the false predicates -- though I wouldn't be opposed to skipping mir-build (or at least all of mir-opt) in the case that they have impossible predicates. This PR doesn't currently do that because I wanted to keep the affected compiler surface small, since it's the inliner that I have seen with the most ICEs due to calling |
bors
commented
Apr 3, 2022
☔ The latest upstream changes (presumably #85321) made this pull request unmergeable. Please resolve the merge conflicts. |
9436ebe to
eb164bfComparecompiler-errors
commented
Apr 14, 2022
@rustbot author |
eb164bf to
ed81aa6Comparecompiler-errors
commented
Apr 21, 2022
@rustbot ready r? rust-lang/compiler |
There was a problem hiding this comment.
It's surprising to me that this doesn't just delegate to item_has_impossible_predicates_for_item.
The behavior these two are slightly different; could they be merged?
There was a problem hiding this comment.
I tried to before, but I had some regressions.
I think I could try again if I'm smarter with some things though... I'll investigate this weekend.
There was a problem hiding this comment.
Do you think we should land this in the meantime? If so, I think I'd like a FIXME added, but other than that, r=me
There was a problem hiding this comment.
It's not ridiculously critical, so I'll play around with it this weekend and either r=you with a better description of why they're different, or unify these two.
ed81aa6 to
6fd51e7Compare
This comment has been minimized.
This comment has been minimized.
compiler-errors
commented
Apr 24, 2022
@bors try @rust-timer queue |
rust-timer
commented
Apr 24, 2022
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
bors
commented
Apr 24, 2022
⌛ Trying commit 41ad624 with merge c55a268fc101a6e678d0894680e56e83673f0993... |
bors
commented
Apr 24, 2022
☀️ Try build successful - checks-actions |
rust-timer
commented
Apr 24, 2022
Queued c55a268fc101a6e678d0894680e56e83673f0993 with parent 18f314e, future comparison URL. |
rust-timer
commented
Apr 25, 2022
Finished benchmarking commit (c55a268fc101a6e678d0894680e56e83673f0993): comparison url. Summary:
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. Benchmarking 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 Footnotes |
compiler-errors
commented
Apr 25, 2022
Oof, that perf regression sucks. It's possibly because I'm elaborating the predicates always. Testing the previous implementation for perf regression in #96382. |
compiler-errors
commented
Jun 11, 2022
This was superseded by #96806 |
Fix a few cases where impossible founds can be found and can cause ICEs in codegen/linting.
Fixes#94999
Fixes#94680
Actually fixes#93008 this time