[clang] [clang] Add __builtin_start_object_lifetime builtin. (PR #82776)
A. Jiang via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 23 10:27:42 PST 2024
frederick-vs-ja wrote:
> * with `-fstrict-vtable-pointers` flag, we update the vtpr assumption correctly (mark the load/store vptr with appropriate invariant group intrinsics) to prevent incorrect vptr load folding;
I _guess_ we want a variant of this intrinsic which doesn't affect analyzation for devirtualization. Such an intrinsic should be sufficient for **C++23** `std::start_lifetime_as(_array)`.
> * for now, it is non-constant, thus cannot be executed in constant evaluation;
It seems intended that `std::start_lifetime_as(_array)` is not usable in constant evaluation, as the indeterminism of implicit object creation doesn't seem compatible with constant evaluation.
https://github.com/llvm/llvm-project/pull/82776
More information about the cfe-commits
mailing list