GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — bpo-44340: Add support for building with clang thin lto via --with-lto=thin by holmanb · Pull Request #26585 · python/cpython Conversation
|
|
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA). CLA MissingOur records indicate the following people have not signed the CLA: For legal reasons we need all the people listed to sign the CLA before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. If you have recently signed the CLA, please wait at least one business day You can check yourself to see if the CLA has been received. Thanks again for the contribution, we look forward to reviewing it! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. Without commenting on the desirability of the feature, be aware thatconfigure is a derived file produced from configure.ac by the autoconf tool. The PR needs to change configure.ac and then run autoconf and commit the resulting changes to configure too. See the devguide for more info.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Please add the NEWS.d with blurb tool
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@holmanb |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Let's run the https://github.com/python/pyperformance benchmark and compare it with full LTO |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
| (default is no) | ||
| --with-assertions build with C assertions enabled (default is no) | ||
| --with-lto enable Link-Time-Optimization in any build (default | ||
| --with-lto[=no|thin] enable Link-Time-Optimization in any build (default |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
What about
--with-lto[=full|thin] enable Link-Time-Optimization in any build (default is full)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| --with-assertions build with C assertions enabled (default is no) | ||
| --with-lto enable Link-Time-Optimization in any build (default | ||
| --with-lto[=no|thin] enable Link-Time-Optimization in any build (default | ||
| is no) |
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
the current no means that whether we apply LTO or not.
So the configure should be updated if we also provide the thin LTO option.
Following options should be available.
A. no LTO (by default) ./configure
B. with LTO (default=full) ./configure --with-lto
C. with LTO (full LTO designated) ./configure --with-lto=full
D. with LTO (thin LTO designated) ./configure --with-lto=thin
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| LTOFLAGS="-flto$LTO_ARG -Wl,-export_dynamic" | ||
| LTOCFLAGS="-flto$LTO_ARG" | ||
| ;; | ||
| *) | ||
| LTOFLAGS="-flto" | ||
| LTOFLAGS="-flto$LTO_ARG" |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Are the flags (thing or otherwise) supported by all compilers that support LTO?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
No. Thinlto is a more recent implementation than the default that is specific to clang.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here's something I think about supporting the LTO options.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Then we should probably need show an error if the compiler doesn't support it or/and document the limitation, because otherwise, it seems that is a general option that we are exposing regardless of the compiler.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
@corona10 - I like it. That's more readable and provides a warning as @pablogsal suggested.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
@corona10 Nitpick: gcc doesn't have a concept of full, and if --with-lto=full is configured with gcc, no warnings are thrown and -flto is assumed. Is this assumption sensible? Or would throwing an error on a nonsense input be better than assuming intent?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I think given that these options are only available on clang we should just fail if the compiler is not clang. Adding checks to other compilers one by one is going to be suboptimal because CPython can be compiled with almost any C compiler: xcl, icc...
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Let's discuss the supporting option with the attached PR.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
@ned-deily The current I assume that getting this fixed upstream is a prerequisite for getting this PR merged, otherwise autoconf will generate a Perhaps a CI bot to verify that in future PRs |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.