Add option to support clang LTO(Link Time Optimization) and time-traces#4890
Add option to support clang LTO(Link Time Optimization) and time-traces#4890ti-chi-bot merged 4 commits intopingcap:masterfrom
Conversation
|
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. DetailsReviewer can indicate their review by submitting an approval review. |
|
For LTO, consider adding |
Add flags |
|
/merge |
|
@solotzg: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests You only need to trigger If you have any questions about the PR merge process, please refer to pr process. DetailsInstructions 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 ti-community-infra/tichi repository. |
|
This pull request has been accepted and is ready to merge. DetailsCommit hash: cd04a34 |
Coverage for changed filesCoverage summaryfull coverage report (for internal network access only) |
Coverage for changed filesCoverage summaryfull coverage report (for internal network access only) |
Coverage for changed filesCoverage summaryfull coverage report (for internal network access only) |
What problem does this PR solve?
Issue Number: ref #4909
Problem Summary:
What is changed and how it works?
For example:
tiflash/dbms/src/Storages/Transaction/TMTContext.cpp
Lines 74 to 82 in e03dcc1
Use
objdump -d ${original-tiflash-binary} | grep 'getKVStore', you can see at least 63 records like:Other modules only can invoke
TMTContext::getKVStoreby calling method through instructioncallq.Because other object files can not optimize invoking
TMTContext::getKVStoreunless implementations ofTMTContext::getKVStoreis declared in header file(TMTContext.h).With
LTO,objdump -d ${new-tiflash-binary} | grep 'getKVStore'will get nothing. Because linker can analyze the whole context and make it inline automatically. It's friendly for forward declaration.Binary size can be reduced from 329M to 293M.
Check List
Tests
Side effects
Documentation
Release note