The new memory(...) attribute describes how a function is allowed to access memory. It's documented here (I can't link to the section for that attribute, but it's under memory). There is also the original RFC for it
This PR adds support for it, so instead of UnknownAttribute it shows up as a Memory variant, with the arguments to the attribute accessible via fields on the variant
Its IR looks like:
define void @foo1() memory(readwrite, argmem: none) {
ret void
}
define void @foo2() memory(read) {
ret void
}
The data for the attribute is internally encoded as an int, a bitmask of permissions for each of the locations
The attributes test IR file is forked, now with an LLVM 16+ version that has these new memory attributes, along with tests in basic_tests.rs to verify that they parse the correct values
The new
memory(...)
attribute describes how a function is allowed to access memory. It's documented here (I can't link to the section for that attribute, but it's under memory). There is also the original RFC for itThis PR adds support for it, so instead of
UnknownAttribute
it shows up as aMemory
variant, with the arguments to the attribute accessible via fields on the variantIts IR looks like:
The data for the attribute is internally encoded as an int, a bitmask of permissions for each of the locations
The attributes test IR file is forked, now with an LLVM 16+ version that has these new memory attributes, along with tests in
basic_tests.rs
to verify that they parse the correct values