-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Closed
Labels
ClangIRAnything related to the ClangIR projectAnything related to the ClangIR project
Description
Overview
Upstream support for handling the volatile qualifier on variables and parameters in ClangIR.
The clang AST contains information indicating when volatile handling is required. This task involves updating the existing load and store handling to set the volatile attribute when required.
The existing code has the following placeholders where changes are needed.
assert(!cir::MissingFeatures::opLoadStoreVolatile());
assert(!cir::MissingFeatures::aggValueSlotVolatile());
Additional changes will be required.
Suggested minimal test case
int test_load(volatile int *ptr) {
return *ptr;
}
void test_store(volatile int *ptr) {
*ptr = 42;
}
Existing incubator tests
clang/test/CIR/CodeGen/volatile.cpp
Metadata
Metadata
Assignees
Labels
ClangIRAnything related to the ClangIR projectAnything related to the ClangIR project