Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upconvert NLL ops to caches #51538
convert NLL ops to caches #51538
Conversation
This comment has been minimized.
This comment has been minimized.
|
(rust_highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
|
@bors try |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
cc @Mark-Simulacrum — if you get a chance, once the try run is complete, can you off a perf run? (I will try to ping you again when that has happened...) |
This comment has been minimized.
This comment has been minimized.
|
I've queued the perf build, I think it'll start late enough to be in time for try to complete. |
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
|
Results show a decent win, though not (yet!) where I hope to get it:
|
This comment has been minimized.
This comment has been minimized.
|
r? @pnkfelix |
40e3e02
to
d3115ab
This comment has been minimized.
This comment has been minimized.
|
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
30b3ad8
to
9e67309
This comment has been minimized.
This comment has been minimized.
|
@bors try |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
This PR is -- I believe -- at a pretty decent state. |
This comment has been minimized.
This comment has been minimized.
|
(Once the try build completes, I would like to get a perf run.) |
This comment has been minimized.
This comment has been minimized.
| let ProvePredicate { | ||
| param_env, | ||
| predicate, | ||
| } = key; |
This comment has been minimized.
This comment has been minimized.
eddyb
Jun 27, 2018
Member
This is written differently than subtype/eq (i.e. not unpacking in closure args), why?.
| ObligationCause::dummy(), | ||
| param_env, | ||
| predicate, | ||
| )], |
This comment has been minimized.
This comment has been minimized.
eddyb
Jun 27, 2018
Member
Interesting, I would've expected you to pass fulfill_cx to the closure instead.
This comment has been minimized.
This comment has been minimized.
eddyb
Jun 27, 2018
Member
Oookay turns out GitHub deleted replies to comments... I was only wanting to move it.
@nikomatsakis replied to the original version of this (found in my email):
Hmm. That's not a bad idea. I've been trying to encapsulate the FulfillmentContext to some degree, since it's part of the "old trait system" and not really a part of the new one, and for most of the methods they have an InferOk all setup to return. But the inefficiency here does annoy me so....
This comment has been minimized.
This comment has been minimized.
|
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
7140559
to
b181195
This comment has been minimized.
This comment has been minimized.
|
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
c37de00
to
f48efa9
This comment has been minimized.
This comment has been minimized.
|
r=me with #51538 (comment) (passing |
This comment has been minimized.
This comment has been minimized.
|
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
f48efa9
to
56ccfc4
56ccfc4
to
1523de3
This comment has been minimized.
This comment has been minimized.
|
@bors r=eddyb |
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
|
@bors p=1 kind of critical for NLL |
This comment has been minimized.
This comment has been minimized.
convert NLL ops to caches This is a extension of <#51460>. It uses a lot more caching than we used to do. This caching is not yet as efficient as it could be, but I'm curious to see the current perf results. This is the high-level idea: in the MIR type checker, use [canonicalized queries](https://rust-lang-nursery.github.io/rustc-guide/traits/canonical-queries.html) for all the major operations. This is helpful because the MIR type check is operating in a context where all types are fully known (mostly, anyway) but regions are completely renumbered. This means we often wind up with duplicate queries like `Foo<'1, '2> :Bar` and `Foo<'3, '4>: Bar`. Canonicalized queries let us re-use the results. By the final commit in this PR, we can essentially just "read off" the resulting region relations and add them to the NLL type check.
This comment has been minimized.
This comment has been minimized.
|
|
nikomatsakis commentedJun 13, 2018
•
edited
This is a extension of #51460. It uses a lot more caching than we used to do. This caching is not yet as efficient as it could be, but I'm curious to see the current perf results.
This is the high-level idea: in the MIR type checker, use canonicalized queries for all the major operations. This is helpful because the MIR type check is operating in a context where all types are fully known (mostly, anyway) but regions are completely renumbered. This means we often wind up with duplicate queries like
Foo<'1, '2> :BarandFoo<'3, '4>: Bar. Canonicalized queries let us re-use the results. By the final commit in this PR, we can essentially just "read off" the resulting region relations and add them to the NLL type check.