summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2017-06-08 17:08:58 +0000
committerCraig Topper <craig.topper@gmail.com>2017-06-08 17:08:58 +0000
commitdb52809e77cb776938bbafc22f05fab950a2beb8 (patch)
tree5aee3a306c34901828084aaf900b5802aadae7a7
parentb5a03797df1558e6e17f85dbfd96b8fd8ebcd0c5 (diff)
downloadbcm5719-llvm-db52809e77cb776938bbafc22f05fab950a2beb8.tar.gz
bcm5719-llvm-db52809e77cb776938bbafc22f05fab950a2beb8.zip
[LazyValueInfo] Make LVILatticeVal intersect method take arguments by reference so we don't copy ConstantRanges unless we need to.
llvm-svn: 304990
-rw-r--r--llvm/lib/Analysis/LazyValueInfo.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/LazyValueInfo.cpp b/llvm/lib/Analysis/LazyValueInfo.cpp
index a673b6d4247..87e7f9bf0af 100644
--- a/llvm/lib/Analysis/LazyValueInfo.cpp
+++ b/llvm/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())
OpenPOWER on IntegriCloud