[ConstantFPRange] Outline special member functions #163814
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As discussed in #111544 (comment), large special member functions in APFloat/ConstantFPRange prevent function inlining and cause compile-time regression. This patch moves them into the cpp file.
Compile-time improvement (with #111544): https://llvm-compile-time-tracker.com/compare.php?from=3df3102ff95af6724e684520d7b75d9f288ceeed&to=e438bae71d1fd55640d942b9ad795de2f60e44f2&stat=instructions:u
On llvm-opt-benchmark, this patch yields about -0.1% improvement: #111544 (comment)
I also did some experiments about outlining special member functions of APInt::Storage: https://llvm-compile-time-tracker.com/compare.php?from=f4359301c033694d36865c7560714164d2050240&to=65f55cdd23a625bd7dc51ae723916b8b5a80c5f8&stat=instructions:u