[IR] Add support for memory attribute

This implements IR and bitcode support for the memory attribute,
as specified in https://reviews.llvm.org/D135597.

The new attribute is not used for anything yet (and as such, the
old memory attributes are unaffected).

Differential Revision: https://reviews.llvm.org/D135592
This commit is contained in:
Nikita Popov
2022-10-10 14:33:13 +02:00
parent 9d9de5a5df
commit e9754f0211
14 changed files with 311 additions and 5 deletions

View File

@@ -656,6 +656,8 @@ static uint64_t getAttrKindEncoding(Attribute::AttrKind Kind) {
return bitc::ATTR_KIND_ALLOCATED_POINTER;
case Attribute::AllocKind:
return bitc::ATTR_KIND_ALLOC_KIND;
case Attribute::Memory:
return bitc::ATTR_KIND_MEMORY;
case Attribute::Naked:
return bitc::ATTR_KIND_NAKED;
case Attribute::Nest: