[IR] Add vscale_range IR function attribute

This attribute represents the minimum and maximum values vscale can
take. For now this attribute is not hooked up to anything during
codegen, this will be added in the future when such codegen is
considered stable.

Additionally hook up the -msve-vector-bits=<x> clang option to emit this
attribute.

Differential Revision: https://reviews.llvm.org/D98030
This commit is contained in:
Bradley Smith
2021-03-03 13:53:30 +00:00
parent 093c73b470
commit 839304c777
18 changed files with 231 additions and 2 deletions
+2
View File
@@ -738,6 +738,8 @@ static uint64_t getAttrKindEncoding(Attribute::AttrKind Kind) {
return bitc::ATTR_KIND_SWIFT_SELF;
case Attribute::UWTable:
return bitc::ATTR_KIND_UW_TABLE;
case Attribute::VScaleRange:
return bitc::ATTR_KIND_VSCALE_RANGE;
case Attribute::WillReturn:
return bitc::ATTR_KIND_WILLRETURN;
case Attribute::WriteOnly: