C++ Logo

sg15

Advanced search

[P3033] Should we import function bodies to get better optimizations?

From: Chuanqi Xu <chuanqi.xcq_at_[hidden]>
Date: Wed, 01 Nov 2023 13:10:15 +0800
Hi,
 See https://github.com/llvm/llvm-project/issues/60996 <https://github.com/llvm/llvm-project/issues/60996 > for the motivating issue.
 I found that currently the clang's behavior of treating importing functions to optimizers is interesting.
 At O0, clang won't generate the bodies of non-inline function from imported modules. But with optimization enabled, clang would generate the bodies of non-inline functions for inlining. Daniel pointed out that this is not only an implementation choices but related to libraries ABI and ODR violations. And he suggests a paper to present the problem clearly and trying to get a consensus in vendors. Then here is the paper: https://isocpp.org/files/papers/P3033R0.html <https://isocpp.org/files/papers/P3033R0.html >
 Since I won't be in Kona in person, it may be better to send opinions/comments/questions to the thread directly.
Thanks,
Chuanqi

Received on 2023-11-01 05:10:20