[llvm] r302398 - [SCEV] Have getRangeForAffineARHelper take StartRange by const reference to avoid a copy in many of the cases.

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Sun May 7 19:29:15 PDT 2017


Author: ctopper
Date: Sun May  7 21:29:15 2017
New Revision: 302398

URL: http://llvm.org/viewvc/llvm-project?rev=302398&view=rev
Log:
[SCEV] Have getRangeForAffineARHelper take StartRange by const reference to avoid a copy in many of the cases.

Modified:
    llvm/trunk/lib/Analysis/ScalarEvolution.cpp

Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolution.cpp?rev=302398&r1=302397&r2=302398&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original)
+++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Sun May  7 21:29:15 2017
@@ -4842,7 +4842,7 @@ ScalarEvolution::getRange(const SCEV *S,
 // from StartRange and then is changed by Step up to MaxBECount times. Signed
 // argument defines if we treat Step as signed or unsigned.
 static ConstantRange getRangeForAffineARHelper(APInt Step,
-                                               ConstantRange StartRange,
+                                               const ConstantRange &StartRange,
                                                const APInt &MaxBECount,
                                                unsigned BitWidth, bool Signed) {
   // If either Step or MaxBECount is 0, then the expression won't change, and we




More information about the llvm-commits mailing list