Skip to content
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

Upgrade toolchain to LLVM17 & Support C++23 #8899

Merged
merged 15 commits into from
Jun 25, 2024

Conversation

Lloyd-Pottiger
Copy link
Contributor

@Lloyd-Pottiger Lloyd-Pottiger commented Apr 3, 2024

What problem does this PR solve?

Issue Number: close #8898, close #7193

Problem Summary: upgrade the toolchain to llvm 17.0.6 for better code diagnostic

What is changed and how it works?

tested the performance of TPC-H and TPC-DS under amd64

TPC-H

Clang13 Clang17 diff diff by percentage
Total 64.277 59.913 4.364 6.79
Q19 2.039 1.42 0.619 30.36
Q12 2 1.536 0.465 23.23
Q9 12.333 11.872 0.461 3.74
Q6 0.959 0.641 0.318 33.15
Q14 1.059 0.742 0.317 29.96
Q15 1.067 0.759 0.308 28.89
Q21 6.394 6.127 0.266 4.17
Q18 6.59 6.353 0.237 3.6
Q5 4.06 3.863 0.197 4.85
Q10 2.425 2.247 0.178 7.35
Q20 1.414 1.241 0.173 12.24
Q7 2.473 2.319 0.154 6.24
Q8 3.379 3.237 0.141 4.18
Q4 1.804 1.673 0.13 7.23
Q1 2.862 2.775 0.087 3.03
Q17 5.663 5.582 0.081 1.43
Q13 3.306 3.244 0.062 1.86
Q2 0.903 0.843 0.06 6.62
Q3 2.164 2.107 0.057 2.64
Q22 0.41 0.387 0.023 5.54
Q11 0.404 0.389 0.015 3.74
Q16 0.569 0.556 0.014 2.39

TPC-DS

Clang13 Clang17 diff diff by percentage
Total 630.154 668.895 38.741 6.15
QUERY_95 506.15 540.400 34.25 6.77*
(check the details below)
QUERY_72 5.032 5.767 0.734 14.59
QUERY_53 3.142 3.592 0.45 14.32
QUERY_63 2.748 3.085 0.338 12.28
QUERY_51 46.575 46.9 0.325 0.7
QUERY_65 3.878 4.132 0.255 6.58
QUERY_74 2.765 3.01 0.245 8.86
QUERY_41 7.77 7.97 0.2 2.57
QUERY_96 0.548 0.382 -0.166 -30.35
QUERY_64 2.625 2.79 0.165 6.29
QUERY_3 0.367 0.502 0.135 36.85
QUERY_75 2.402 2.537 0.134 5.58
QUERY_88 2.548 2.65 0.102 4.02
QUERY_47 2.402 2.5 0.098 4.06
QUERY_79 1.365 1.457 0.092 6.72
QUERY_28 1.628 1.715 0.088 5.38
QUERY_46 1.165 1.25 0.085 7.3
QUERY_68 0.971 1.05 0.079 8.13
QUERY_25 1.185 1.25 0.065 5.49
QUERY_7 0.945 1.006 0.061 6.48
QUERY_17 1.448 1.502 0.055 3.8
QUERY_31 0.604 0.657 0.053 8.74
QUERY_1 1.802 1.85 0.048 2.64
QUERY_13 1.82 1.865 0.045 2.47
QUERY_50 0.471 0.514 0.043 9.18
QUERY_48 1.908 1.95 0.042 2.23
QUERY_29 1.222 1.265 0.042 3.48
QUERY_89 1.175 1.213 0.038 3.26
QUERY_24_0 0.616 0.654 0.038 6.13
QUERY_24_1 0.61 0.647 0.037 6.02
QUERY_26 0.413 0.449 0.036 8.73
QUERY_10 0.473 0.506 0.034 7.12
QUERY_49 0.82 0.853 0.033 3.99
QUERY_94 0.287 0.32 0.033 11.44
QUERY_43 0.593 0.624 0.031 5.22
QUERY_69 0.408 0.438 0.03 7.27
QUERY_60 0.61 0.64 0.03 4.91
QUERY_66 0.632 0.658 0.027 4.2
QUERY_35 0.731 0.756 0.025 3.42
QUERY_15 0.188 0.214 0.025 13.4
QUERY_71 0.597 0.622 0.024 4.06
QUERY_73 0.505 0.525 0.021 4.07
QUERY_81 0.235 0.256 0.02 8.57
QUERY_34 0.783 0.802 0.019 2.38
QUERY_99 0.863 0.881 0.018 2.08
QUERY_61 0.9 0.918 0.018 2.02
QUERY_21 0.34 0.323 -0.017 -4.95
QUERY_91 0.176 0.16 -0.016 -9.04
QUERY_84 0.133 0.147 0.015 10.98
QUERY_56 0.552 0.565 0.014 2.45
QUERY_93 0.681 0.667 -0.014 -2.03
QUERY_76 0.343 0.358 0.014 4.1
QUERY_19 0.518 0.531 0.013 2.54
QUERY_33 0.576 0.588 0.012 2.06
QUERY_45 0.202 0.214 0.012 6.1
QUERY_62 0.446 0.459 0.012 2.77
QUERY_6 0.35 0.361 0.011 3.19
QUERY_16 0.682 0.693 0.011 1.67
QUERY_98 0.344 0.353 0.009 2.51
QUERY_54 0.533 0.542 0.009 1.64
QUERY_30 0.252 0.26 0.008 3.28
QUERY_44 0.275 0.283 0.008 2.83
QUERY_37 0.207 0.215 0.007 3.61
QUERY_90 0.148 0.142 -0.006 -4.18
QUERY_92 0.139 0.145 0.006 4.35
QUERY_40 0.426 0.432 0.006 1.5
QUERY_42 0.268 0.263 -0.005 -1.76
QUERY_52 0.266 0.271 0.005 1.86
QUERY_57 1.018 1.022 0.005 0.49
QUERY_58 0.4 0.406 0.005 1.36
QUERY_83 0.302 0.306 0.004 1.26
QUERY_87 2.042 2.047 0.004 0.2
QUERY_12 0.12 0.123 0.004 3.03
QUERY_82 0.262 0.265 0.003 1.34
QUERY_55 0.245 0.248 0.003 1.05
QUERY_20 0.16 0.159 -0.002 -1.01
QUERY_8 0.589 0.59 0.001 0.12
QUERY_32 0.233 0.232 -0.001 -0.35
QUERY_9 0.001 0.001 0 -35.18
TPC-DS query95

The difference in execution times of Round 2 and Round 3 is small. The main difference is in execution time for Round 1. In Round 1, the main difference is HashJoin_232, which is executed in TiDB.

Clang13 Clang17
Round 1 691.10 725.30
Round 2 444.00 448.20
Round 3 444.90 447.70

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Upgrade toolchain to LLVM17 & Support C++23

@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 3, 2024
@zhangjinpeng87
Copy link

@Lloyd-Pottiger How about hold this PR until 8.1LTS released?

@Lloyd-Pottiger
Copy link
Contributor Author

/hold

hold until 8.1LTS released

@ti-chi-bot ti-chi-bot bot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 4, 2024
@Lloyd-Pottiger Lloyd-Pottiger changed the title Support C++23 Pre-support for C++23 Apr 10, 2024
@Lloyd-Pottiger
Copy link
Contributor Author

/unhold

@ti-chi-bot ti-chi-bot bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 10, 2024
@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Apr 11, 2024
Signed-off-by: Lloyd-Pottiger <[email protected]>
@ti-chi-bot ti-chi-bot bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Apr 15, 2024
@Lloyd-Pottiger
Copy link
Contributor Author

/run-build-release

1 similar comment
@Lloyd-Pottiger
Copy link
Contributor Author

/run-build-release

@sre-bot
Copy link
Collaborator

sre-bot commented Jun 12, 2024

@ti-chi-bot ti-chi-bot bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels Jun 24, 2024
Copy link
Contributor

@JaySon-Huang JaySon-Huang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Jun 24, 2024
@wuhuizuo
Copy link
Contributor

/hold

wait for more detail votes.

@ti-chi-bot ti-chi-bot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 24, 2024
@wuhuizuo
Copy link
Contributor

/assign @purelind

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jun 25, 2024
Copy link
Contributor

ti-chi-bot bot commented Jun 25, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-06-24 09:53:15.558678546 +0000 UTC m=+626922.044167376: ☑️ agreed by JaySon-Huang.
  • 2024-06-25 02:18:21.331114556 +0000 UTC m=+686027.816603390: ☑️ agreed by zanmato1984.

@JaySon-Huang
Copy link
Contributor

/unhold

@ti-chi-bot ti-chi-bot bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 25, 2024
Copy link
Collaborator

@purelind purelind left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

Copy link
Contributor

ti-chi-bot bot commented Jun 25, 2024

@purelind: adding LGTM is restricted to approvers and reviewers in OWNERS files.

In response to this:

/lgtm

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link

@yudongusa yudongusa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

ti-chi-bot bot commented Jun 25, 2024

@yudongusa: adding LGTM is restricted to approvers and reviewers in OWNERS files.

In response to this:

LGTM

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link
Contributor

ti-chi-bot bot commented Jun 25, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JaySon-Huang, purelind, yudongusa, zanmato1984

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [JaySon-Huang,zanmato1984]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot merged commit 06427c4 into pingcap:master Jun 25, 2024
5 checks passed
@Lloyd-Pottiger Lloyd-Pottiger deleted the support-c++23 branch June 25, 2024 05:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade C++ standard to C++23 Clang 17 & C++23 Compatibility
10 participants