-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use new solver in evaluate_obligation
query (when new solver is enabled)
#107103
Use new solver in evaluate_obligation
query (when new solver is enabled)
#107103
Conversation
Some changes occurred to the core trait solver cc @rust-lang/initiative-trait-system-refactor |
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
⌛ Trying commit 3e31e7b112ec1faffa1f32f1423185fb70ecc474 with merge 198dee10dce45e624f5a7e09f329deac21a34261... |
evaluate_obligation
queryevaluate_obligation
query (when new solver is enabled)
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (198dee10dce45e624f5a7e09f329deac21a34261): comparison URL. Overall result: no relevant changes - no 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. @bors rollup=never Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis 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.
CyclesResultsThis 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.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to also do the same for evaluate_predicates_recursively
🤔 and then ICE if -Ztrait-solver=next
is ever enabled in evaluate_predicate_recursively
. That would mean that apart from shallow selection, we never use the old solver when testing the old solver. That will need another perf run though as that code is even hotter.
apart from that 👍
@rustbot author |
3e31e7b
to
3ef7bb2
Compare
I know this isn't the final approach, but let's see how hot these @bors try @rust-timer |
@rust-timer queue |
This comment has been minimized.
This comment has been minimized.
⌛ Trying commit 3ef7bb2836d152bc0a2a291f18f66b48916ec33b with merge b9518856fe196e67df8bd4040c2562710219eda2... |
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (b9518856fe196e67df8bd4040c2562710219eda2): comparison URL. Overall result: ❌ regressions - 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)ResultsThis 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.
CyclesResultsThis 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.
|
@bors rollup=always |
@bors r- 😅 |
going to remove I think we should instead change |
Makes sense |
9dc2e24
to
b78f8de
Compare
@rustbot ready This could take a quick look, I'm using the same strategy as |
can you move this to r=me on the impl using probe though |
@@ -141,11 +147,11 @@ type CanonicalResponse<'tcx> = Canonical<'tcx, Response<'tcx>>; | |||
/// solver, merge the two responses again. | |||
pub type QueryResult<'tcx> = Result<CanonicalResponse<'tcx>, NoSolution>; | |||
|
|||
pub trait TyCtxtExt<'tcx> { | |||
pub trait TyCtxtSolveExt<'tcx> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops i guess i should revert this too lol
b78f8de
to
5bfd90e
Compare
@@ -92,6 +120,9 @@ impl<'tcx> InferCtxtExt<'tcx> for InferCtxt<'tcx> { | |||
&self, | |||
obligation: &PredicateObligation<'tcx>, | |||
) -> EvaluationResult { | |||
// Run canonical query. If overflow occurs, rerun from scratch but this time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is a leftover from 2fd5516, and should have been moved to this function instead of left in evaluate_obligation
, where this behavior notable does not occur.
@bors r=lcnr rollup=maybe |
…e_obligation, r=lcnr Use new solver in `evaluate_obligation` query (when new solver is enabled) (only when `-Ztrait-solver=next`, of course) ... Does this make sense? It seems to me like it should be reasonable, but maybe there's some reason why this is a bad idea. r? `@lcnr` Needs a perf run because I guess this `solver == TraitSolver::Next` check is on a hot path.
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#107022 (Implement `SpecOptionPartialEq` for `cmp::Ordering`) - rust-lang#107100 (Use proper `InferCtxt` when probing for associated types in astconv) - rust-lang#107103 (Use new solver in `evaluate_obligation` query (when new solver is enabled)) - rust-lang#107190 (Recover from more const arguments that are not wrapped in curly braces) - rust-lang#107306 (Correct suggestions for closure arguments that need a borrow) - rust-lang#107339 (internally change regions to be covariant) - rust-lang#107344 (Minor tweaks in the new solver) - rust-lang#107373 (Don't merge vtables when full debuginfo is enabled.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
(only when
-Ztrait-solver=next
, of course)... Does this make sense? It seems to me like it should be reasonable, but maybe there's some reason why this is a bad idea.
r? @lcnr
Needs a perf run because I guess this
solver == TraitSolver::Next
check is on a hot path.