-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CIR] Atomic builtins with non-const memory order (#736)
Fix #731 Implement atomic built-in operations where the memory order argument is a runtime value rather than a compile-time constant. This is necessary to support `std::atomic`. The ClangIR atomic operations don't support runtime memory orders, so this is implemented during CodeGen by generating a switch statement that effectively converts the runtime memory order into a compile-time memory order. A new file, atomic-runtime.cpp, was added to the ClangIR CodeGen tests to cover this situation.
- Loading branch information
1 parent
dafb6eb
commit a944884
Showing
3 changed files
with
533 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.