This is an archive of the discontinued LLVM Phabricator instance.

[Builtins] Add __builtin_implicit_object_fence.
Needs ReviewPublic

Authored by davidtgoldblatt on Mar 27 2023, 8:33 PM.

Details

Reviewers
rsmith
Summary

This is a builtin that allows the easy implementation of C++23's
start_lifetime_as. It takes a pointer, and returns a pointer allowing
implicit object creation at the given region of storage that will keep
the same object representation.

For now this just means forwarding llvm.tbaa.fence, which I believe is the only
place that C++-level type information makes it into LLVM IR in a
semantics-affecting way.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptMar 27 2023, 8:33 PM
davidtgoldblatt published this revision for review.Mar 28 2023, 10:30 AM
davidtgoldblatt added a reviewer: rsmith.

Adding @zygoloid as a p2590 author for review

Herald added a project: Restricted Project. · View Herald TranscriptMar 28 2023, 10:32 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript