[AttrBuilder] Remove unused vscale accessors (NFC)
authorNikita Popov <npopov@redhat.com>
Tue, 11 Oct 2022 08:29:44 +0000 (10:29 +0200)
committerNikita Popov <npopov@redhat.com>
Tue, 11 Oct 2022 08:33:33 +0000 (10:33 +0200)
These accessors are not used. Generally, nowadays it is preferable
to perform queries on AttributeSets/Lists, rather than the
AttrBuilder, which is optimized towards attribute construction now.

llvm/include/llvm/IR/Attributes.h
llvm/lib/IR/Attributes.cpp

index 7673786..986f7a2 100644 (file)
@@ -1146,12 +1146,6 @@ public:
   /// doesn't exist, pair(0, 0) is returned.
   std::pair<unsigned, Optional<unsigned>> getAllocSizeArgs() const;
 
-  /// Retrieve the minimum value of 'vscale_range'.
-  unsigned getVScaleRangeMin() const;
-
-  /// Retrieve the maximum value of 'vscale_range' or None when unknown.
-  Optional<unsigned> getVScaleRangeMax() const;
-
   /// Add integer attribute with raw value (packed/encoded if necessary).
   AttrBuilder &addRawIntAttr(Attribute::AttrKind Kind, uint64_t Value);
 
index e9fc3e0..cbd299c 100644 (file)
@@ -1653,14 +1653,6 @@ std::pair<unsigned, Optional<unsigned>> AttrBuilder::getAllocSizeArgs() const {
   return unpackAllocSizeArgs(getRawIntAttr(Attribute::AllocSize));
 }
 
-unsigned AttrBuilder::getVScaleRangeMin() const {
-  return unpackVScaleRangeArgs(getRawIntAttr(Attribute::VScaleRange)).first;
-}
-
-Optional<unsigned> AttrBuilder::getVScaleRangeMax() const {
-  return unpackVScaleRangeArgs(getRawIntAttr(Attribute::VScaleRange)).second;
-}
-
 AttrBuilder &AttrBuilder::addAlignmentAttr(MaybeAlign Align) {
   if (!Align)
     return *this;