-
Notifications
You must be signed in to change notification settings - Fork 13.5k
JumpThreading: compute place and value indices on-demand #142881
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
base: master
Are you sure you want to change the base?
Conversation
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
JumpThreading: compute place and value indices on-demand Perf experiment r? `@ghost`
This comment has been minimized.
This comment has been minimized.
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (1587bef): comparison URL. Overall result: ❌✅ regressions and improvements - please read the text belowBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 3.6%, secondary 2.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeResults (primary -0.1%, secondary 0.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 689.082s -> 684.233s (-0.70%) |
This comment has been minimized.
This comment has been minimized.
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
Some changes occurred in coverage tests. cc @Zalathar |
Profiling JumpThreading reveals that a large part of the runtime happens constructing the place and value
Map
. This is unfortunate, as jump-threading may end up not even doing anything.The cause for this large up-front cost is following:
Map
attempts to create aPlaceIndex
for each place that may hold a relevant value. This means all places that appear in MIR, but also all places whose value is accessed by a projection of a copy of a larger place.This PR refactors the creation of
Map
to happen on-demand: place and value indices are created when threading computation happens.The up-front mode is still relevant for DataflowConstProp, so is not touched.