1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00

[LazyValueInfo] Make LVILatticeVal intersect method take arguments by reference so we don't copy ConstantRanges unless we need to.

llvm-svn: 304990
This commit is contained in:
Craig Topper 2017-06-08 17:08:58 +00:00
parent 3accf6ce63
commit 45a2b92582

View File

@ -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())