summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-04-22 08:36:05 +0000
committerNikita Popov <nikita.ppv@gmail.com>2019-04-22 08:36:05 +0000
commit5299e25f502131483c4555efa641b93bad81a893 (patch)
tree3eaf4cb7b365551d7c5fdac97b498e87995c648e /llvm/lib/Analysis
parentf902250fc13bdcd2dbdb733304f1eed743613eb9 (diff)
downloadbcm5719-llvm-5299e25f502131483c4555efa641b93bad81a893.tar.gz
bcm5719-llvm-5299e25f502131483c4555efa641b93bad81a893.zip
[ConstantRange] Rename make{Guaranteed -> Exact}NoWrapRegion() NFC
Following D60632 makeGuaranteedNoWrapRegion() always returns an exact nowrap region. Rename the function accordingly. This is in line with the naming of makeExactICmpRegion(). llvm-svn: 358875
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r--llvm/lib/Analysis/LazyValueInfo.cpp2
-rw-r--r--llvm/lib/Analysis/ScalarEvolution.cpp8
2 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Analysis/LazyValueInfo.cpp b/llvm/lib/Analysis/LazyValueInfo.cpp
index 02a829f500b..260a2a6ebe0 100644
--- a/llvm/lib/Analysis/LazyValueInfo.cpp
+++ b/llvm/lib/Analysis/LazyValueInfo.cpp
@@ -1146,7 +1146,7 @@ static ValueLatticeElement getValueFromOverflowCondition(
return ValueLatticeElement::getOverdefined();
// Calculate the possible values of %x for which no overflow occurs.
- ConstantRange NWR = ConstantRange::makeGuaranteedNoWrapRegion(
+ ConstantRange NWR = ConstantRange::makeExactNoWrapRegion(
WO->getBinaryOp(), ConstantRange(*C), WO->getNoWrapKind());
// If overflow is false, %x is constrained to NWR. If overflow is true, %x is
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp
index 1f69bc8f22e..1a6fc95b74c 100644
--- a/llvm/lib/Analysis/ScalarEvolution.cpp
+++ b/llvm/lib/Analysis/ScalarEvolution.cpp
@@ -2363,7 +2363,7 @@ StrengthenNoWrapFlags(ScalarEvolution *SE, SCEVTypes Type,
// (A <opcode> C) --> (A <opcode> C)<nsw> if the op doesn't sign overflow.
if (!(SignOrUnsignWrap & SCEV::FlagNSW)) {
- auto NSWRegion = ConstantRange::makeGuaranteedNoWrapRegion(
+ auto NSWRegion = ConstantRange::makeExactNoWrapRegion(
Opcode, C, OBO::NoSignedWrap);
if (NSWRegion.contains(SE->getSignedRange(Ops[1])))
Flags = ScalarEvolution::setFlags(Flags, SCEV::FlagNSW);
@@ -2371,7 +2371,7 @@ StrengthenNoWrapFlags(ScalarEvolution *SE, SCEVTypes Type,
// (A <opcode> C) --> (A <opcode> C)<nuw> if the op doesn't unsign overflow.
if (!(SignOrUnsignWrap & SCEV::FlagNUW)) {
- auto NUWRegion = ConstantRange::makeGuaranteedNoWrapRegion(
+ auto NUWRegion = ConstantRange::makeExactNoWrapRegion(
Opcode, C, OBO::NoUnsignedWrap);
if (NUWRegion.contains(SE->getUnsignedRange(Ops[1])))
Flags = ScalarEvolution::setFlags(Flags, SCEV::FlagNUW);
@@ -4471,7 +4471,7 @@ ScalarEvolution::proveNoWrapViaConstantRanges(const SCEVAddRecExpr *AR) {
ConstantRange AddRecRange = getSignedRange(AR);
ConstantRange IncRange = getSignedRange(AR->getStepRecurrence(*this));
- auto NSWRegion = ConstantRange::makeGuaranteedNoWrapRegion(
+ auto NSWRegion = ConstantRange::makeExactNoWrapRegion(
Instruction::Add, IncRange, OBO::NoSignedWrap);
if (NSWRegion.contains(AddRecRange))
Result = ScalarEvolution::setFlags(Result, SCEV::FlagNSW);
@@ -4481,7 +4481,7 @@ ScalarEvolution::proveNoWrapViaConstantRanges(const SCEVAddRecExpr *AR) {
ConstantRange AddRecRange = getUnsignedRange(AR);
ConstantRange IncRange = getUnsignedRange(AR->getStepRecurrence(*this));
- auto NUWRegion = ConstantRange::makeGuaranteedNoWrapRegion(
+ auto NUWRegion = ConstantRange::makeExactNoWrapRegion(
Instruction::Add, IncRange, OBO::NoUnsignedWrap);
if (NUWRegion.contains(AddRecRange))
Result = ScalarEvolution::setFlags(Result, SCEV::FlagNUW);
OpenPOWER on IntegriCloud