[llvm] r249509 - [OperandBundles] Remove a useless accessor from OperandBundleUser

Sanjoy Das via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 6 19:39:21 PDT 2015


Author: sanjoy
Date: Tue Oct  6 21:39:21 2015
New Revision: 249509

URL: http://llvm.org/viewvc/llvm-project?rev=249509&view=rev
Log:
[OperandBundles] Remove a useless accessor from OperandBundleUser

Since the `const` version of `getOperandBundle` returns a value of the
same type as the non-`const` version, the non-`const` version is
redundant.

Modified:
    llvm/trunk/include/llvm/IR/InstrTypes.h

Modified: llvm/trunk/include/llvm/IR/InstrTypes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/InstrTypes.h?rev=249509&r1=249508&r2=249509&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/InstrTypes.h (original)
+++ llvm/trunk/include/llvm/IR/InstrTypes.h Tue Oct  6 21:39:21 2015
@@ -1204,15 +1204,6 @@ public:
     return OperandBundleUse(BOI->Tag->getKey(), Inputs);
   }
 
-  /// \brief Return the operand bundle at a specific index.
-  OperandBundleUse getOperandBundle(unsigned Index) {
-    assert(Index < getNumOperandBundles() && "Index out of bounds!");
-    auto *BOI = bundle_op_info_begin() + Index;
-    auto op_begin = static_cast<InstrTy *>(this)->op_begin();
-    ArrayRef<Use> Inputs(op_begin + BOI->Begin, op_begin + BOI->End);
-    return OperandBundleUse(BOI->Tag->getKey(), Inputs);
-  }
-
 protected:
   /// \brief Used to keep track of an operand bundle.  See the main comment on
   /// OperandBundleUser above.




More information about the llvm-commits mailing list