[C++] Support `__builtin_observable_checkpoint`
Nobody has claimed this yet.
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
To support P1494 we need a built-in that lowers to an IR instruction that would behave like an opaque function and would resist time travel UB during optimisation.
__builtin_observable_checkpoint is the name that has been chosen by GCC.
I'm happy to implement the builtin in clang once we know what to lower it too.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading P1494 and the existing discussion in this issue. No files, tests, or lowering entry points are named, so first determine the required IR instruction semantics and where Clang should implement the builtin. Done means an agreed lowering design and a working __builtin_observable_checkpoint implementation with suitable coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100