diff options
| author | Bradley Smith <bradley.smith@arm.com> | 2021-03-03 13:53:30 +0000 |
|---|---|---|
| committer | Bradley Smith <bradley.smith@arm.com> | 2021-03-22 12:05:06 +0000 |
| commit | 48f5a392cb73d99a58f01448926f6964ab5b0d0a (patch) | |
| tree | 50bae4942a4fa20a48bfb446dd2b2e065f550a83 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
| parent | 2bbc9bccf095b92b3ed1ab9669fab8a7dc96ee6d (diff) | |
[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
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
| -rw-r--r-- | llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index fd2432981acf..951e32e36dd6 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -1526,6 +1526,8 @@ static Attribute::AttrKind getAttrFromCode(uint64_t Code) { return Attribute::SwiftSelf; case bitc::ATTR_KIND_UW_TABLE: return Attribute::UWTable; + case bitc::ATTR_KIND_VSCALE_RANGE: + return Attribute::VScaleRange; case bitc::ATTR_KIND_WILLRETURN: return Attribute::WillReturn; case bitc::ATTR_KIND_WRITEONLY: @@ -1638,6 +1640,8 @@ Error BitcodeReader::parseAttributeGroupBlock() { B.addDereferenceableOrNullAttr(Record[++i]); else if (Kind == Attribute::AllocSize) B.addAllocSizeAttrFromRawRepr(Record[++i]); + else if (Kind == Attribute::VScaleRange) + B.addVScaleRangeAttrFromRawRepr(Record[++i]); } else if (Record[i] == 3 || Record[i] == 4) { // String attribute bool HasValue = (Record[i++] == 4); SmallString<64> KindStr; |
