]> granicus.if.org Git - llvm/commitdiff
[Reassociate] Const correct a helper function. NFC
authorCraig Topper <craig.topper@intel.com>
Wed, 21 Jun 2017 19:39:33 +0000 (19:39 +0000)
committerCraig Topper <craig.topper@intel.com>
Wed, 21 Jun 2017 19:39:33 +0000 (19:39 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305945 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/Reassociate.cpp

index 99c46ae8cbe40816f3e875a27015dbd811c29997..bd896c012e88230e0c15e835747f137e4f786eb4 100644 (file)
@@ -957,8 +957,8 @@ static BinaryOperator *ConvertShiftToMul(Instruction *Shl) {
 /// Scan backwards and forwards among values with the same rank as element i
 /// to see if X exists.  If X does not exist, return i.  This is useful when
 /// scanning for 'x' when we see '-x' because they both get the same rank.
-static unsigned FindInOperandList(SmallVectorImpl<ValueEntry> &Ops, unsigned i,
-                                  Value *X) {
+static unsigned FindInOperandList(const SmallVectorImpl<ValueEntry> &Ops,
+                                  unsigned i, Value *X) {
   unsigned XRank = Ops[i].Rank;
   unsigned e = Ops.size();
   for (unsigned j = i+1; j != e && Ops[j].Rank == XRank; ++j) {