[clang] [Clang] Add support for GCC bound member functions extension (PR #135649)
Zhihao Yuan via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 22 15:19:11 PDT 2025
lichray wrote:
> > We used this extension to improve virtual function calling performance, there are simple and small virtual functions which are frequently called and can not be eliminated and it is in a delegation thus compiler can not optimize. [...]
>
> Can `declcall` (https://wg21.link/p2825) be used for this? It is on track for C++26.
Not according to the design as of R5, because the operand of `declcall` is an unevaluated operand, hence it will not walk into `this` value to find the entry in the actual vtable. Devirtualized pointer in p2825r5 can only be obtained when _qualified-id_ is involved.
https://github.com/llvm/llvm-project/pull/135649
More information about the cfe-commits
mailing list