Skip to content

Conversation

guy-david
Copy link

Cherry-picks llvm#143632.

@guy-david guy-david requested a review from a team as a code owner July 20, 2025 08:24
@guy-david
Copy link
Author

@swift-ci please test

@guy-david guy-david force-pushed the cherry-pick-jump-tables branch from e4d1e52 to 6ed24c9 Compare July 21, 2025 07:14
@guy-david
Copy link
Author

@swift-ci test

Previous stabs at this setting
(llvm#71166) hypertuned it for
SPEC2017, but Clang's own compilation can benefit from a slightly lower
threshold, yielding a 0.3% improvement in compile time, while still not
regressing SPEC.

Most notable beneficiaries of this change are:
 - `llvm::Instruction::getNumSuccessors` (11 cases)
 - `llvm::Instruction::getSuccessor` (11 cases)

Test Suite with a bootstrapped build:
```
Tests: 4316
Metric: compile_time

Program                                       compile_time
                                              lhs          rhs    diff
SingleSour...ce/UnitTests/SignlessTypes/div     0.02         0.02  3.0%
SingleSour.../UnitTests/SignlessTypes/cast2     0.02         0.02  2.8%
SingleSource/Benchmarks/Misc/flops-4            0.02         0.02  1.9%
SingleSour...ebra/solvers/cholesky/cholesky     0.05         0.05  1.8%
SingleSour...tTests/2020-01-06-coverage-006     0.02         0.02  1.7%
SingleSour...ce/Benchmarks/Stanford/FloatMM     0.03         0.03  1.7%
SingleSour...9-04-16-BitfieldInitialization     0.02         0.02  1.7%
SingleSour...nitTests/2003-07-08-BitOpsTest     0.02         0.02  1.7%
MultiSourc...marks/Prolangs-C++/vcirc/vcirc     0.02         0.02  1.6%
MultiSourc...Prolangs-C/fixoutput/fixoutput     0.05         0.05  1.5%
SingleSour...h/stencils/jacobi-1d/jacobi-1d     0.04         0.04  1.4%
MultiSourc...rks/Prolangs-C++/office/office     0.28         0.28  1.4%
SingleSour...arks/Adobe-C++/functionobjects     0.39         0.40  1.3%
SingleSour...Tests/2003-10-29-ScalarReplBug     0.02         0.02  1.2%
SingleSour...arks/Adobe-C++/stepanov_vector     0.41         0.42  1.2%
                           Geomean difference                     -0.3%
      compile_time
l/r            lhs          rhs        diff
count  4316.000000  4316.000000  469.000000
mean   0.057747     0.057595    -0.003034
std    0.544528     0.543139     0.007625
min    0.000000     0.000000    -0.035294
25%    0.000000     0.000000    -0.007006
50%    0.000000     0.000000    -0.003257
75%    0.000000     0.000000     0.000000
max    18.295300    18.252500    0.030151
```

(cherry picked from commit bb1f5c3)
@guy-david guy-david force-pushed the cherry-pick-jump-tables branch from 6ed24c9 to 9e14f6d Compare July 24, 2025 20:31
@guy-david
Copy link
Author

@swift-ci test

@guy-david guy-david merged commit 1724e74 into stable/20240723 Jul 25, 2025
3 checks passed
@guy-david guy-david deleted the cherry-pick-jump-tables branch July 25, 2025 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant