-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Extend GVN to perform local value numbering. #143333
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
This comment has been minimized.
This comment has been minimized.
c7dac45
to
62766e3
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
[TOY] Extend GVN to perform local value numbering. This PR is more a toy than anything else, but I still think the implementation is sound. Current GVN MIR opt can be easily extended to track values that change inside a basic block. This PR attempts that. r? `@ghost` for perf
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (faceb52): 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 9.1%, secondary 2.4%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 44.8%, secondary 29.7%)A less reliable metric. May be of interest, but not used to determine the overall result above.
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: 458.797s -> 582.037s (26.86%) |
c3be10b
to
e521268
Compare
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
[TOY] Extend GVN to perform local value numbering. This PR is more a toy than anything else, but I still think the implementation is sound. Current GVN MIR opt can be easily extended to track values that change inside a basic block. This PR attempts that. r? `@ghost` for perf
e521268
to
0293254
Compare
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
[TOY] Extend GVN to perform local value numbering. This PR is more a toy than anything else, but I still think the implementation is sound. Current GVN MIR opt can be easily extended to track values that change inside a basic block. This PR attempts that. r? `@ghost` for perf
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.
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt Some changes occurred in coverage tests. cc @Zalathar |
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Extend GVN to perform local value numbering.
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (9649fee): comparison URL. Overall result: ❌✅ regressions and improvements - BENCHMARK(S) FAILEDBenchmarking 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 -1.9%, secondary 1.6%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -2.3%, secondary -1.5%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary -0.0%, secondary -0.2%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 479.914s -> 471.289s (-1.80%) |
ebc79a3
to
cd0613c
Compare
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
Extend GVN to perform local value numbering.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (7398137): 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 1.7%, secondary 1.4%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 2.6%, secondary 1.5%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary -0.1%, secondary -0.4%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 472.277s -> 472.35s (0.02%) |
Current GVN MIR opt can be easily extended to track values that change inside a basic block. This PR attempts that.
Most of the algorithm does not change. In particular, all value numbering and the simplifications still work.
The only particular point is handling non-SSA locals.
We separate locals into two groups:
The maps that handle non-SSA locals are cleared at the beginning of each bb, to ensure we do not propagate across blocks.
FIXME: how do we handle derefs across blocks.
r? @ghost for perf