summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2017-04-28 21:48:03 +0000
committerCraig Topper <craig.topper@gmail.com>2017-04-28 21:48:03 +0000
commit72235d084dceac9126d793bb0bd8c1a07a050f16 (patch)
treec470511d209f0a5094bc9e746e7fa03597239212 /llvm/lib
parentca31b9f89ca73d4c0c36dd567d9994a03a28b43e (diff)
downloadbcm5719-llvm-72235d084dceac9126d793bb0bd8c1a07a050f16.tar.gz
bcm5719-llvm-72235d084dceac9126d793bb0bd8c1a07a050f16.zip
[ConstantRange] Use const references to prevent a couple APInt copies. NFC
llvm-svn: 301694
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/IR/ConstantRange.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/IR/ConstantRange.cpp b/llvm/lib/IR/ConstantRange.cpp
index 0cc38b02520..a58a64188c1 100644
--- a/llvm/lib/IR/ConstantRange.cpp
+++ b/llvm/lib/IR/ConstantRange.cpp
@@ -210,8 +210,8 @@ ConstantRange::makeGuaranteedNoWrapRegion(Instruction::BinaryOps BinOp,
-Other.getUnsignedMax()));
if (NoWrapKind & OBO::NoSignedWrap) {
- APInt SignedMin = Other.getSignedMin();
- APInt SignedMax = Other.getSignedMax();
+ const APInt &SignedMin = Other.getSignedMin();
+ const APInt &SignedMax = Other.getSignedMax();
if (SignedMax.isStrictlyPositive())
Result = SubsetIntersect(
OpenPOWER on IntegriCloud