[SCEV] Remove extra APInt copies from getRangeForAffineARHelper.
authorCraig Topper <craig.topper@gmail.com>
Sat, 6 May 2017 06:03:07 +0000 (06:03 +0000)
committerCraig Topper <craig.topper@gmail.com>
Sat, 6 May 2017 06:03:07 +0000 (06:03 +0000)
commit6c5e22a4b876fa6a40929f06d8c3b3967324ce76
tree3686bab7f2086c2c25ec4828a2dfe4131c3e6ccf
parent69f1af29fba253eb908d81fdcb0471487b8813f2
[SCEV] Remove extra APInt copies from getRangeForAffineARHelper.

This changes one parameter to be a const APInt& since we only read from it. Use std::move on local APInts once they are no longer needed so we can reuse their allocations. Lastly, use operator+=(uint64_t) instead of adding 1 to an APInt twice creating a new APInt each time.

llvm-svn: 302335
llvm/lib/Analysis/ScalarEvolution.cpp