From: Craig Topper Date: Thu, 8 Jun 2017 17:08:58 +0000 (+0000) Subject: [LazyValueInfo] Make LVILatticeVal intersect method take arguments by reference so... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fe94f41764302c80a9386860a8d1175c92386d08;p=llvm [LazyValueInfo] Make LVILatticeVal intersect method take arguments by reference so we don't copy ConstantRanges unless we need to. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304990 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/LazyValueInfo.cpp b/lib/Analysis/LazyValueInfo.cpp index a673b6d4247..87e7f9bf0af 100644 --- a/lib/Analysis/LazyValueInfo.cpp +++ b/lib/Analysis/LazyValueInfo.cpp @@ -302,7 +302,7 @@ static bool hasSingleValue(const LVILatticeVal &Val) { /// contradictory. If this happens, we return some valid lattice value so as /// not confuse the rest of LVI. Ideally, we'd always return Undefined, but /// we do not make this guarantee. TODO: This would be a useful enhancement. -static LVILatticeVal intersect(LVILatticeVal A, LVILatticeVal B) { +static LVILatticeVal intersect(const LVILatticeVal &A, const LVILatticeVal &B) { // Undefined is the strongest state. It means the value is known to be along // an unreachable path. if (A.isUndefined())