[llvm] r288874 - [LVI] Remove used return value from markX functions
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 6 17:03:56 PST 2016
Author: reames
Date: Tue Dec 6 19:03:56 2016
New Revision: 288874
URL: http://llvm.org/viewvc/llvm-project?rev=288874&view=rev
Log:
[LVI] Remove used return value from markX functions
Modified:
llvm/trunk/lib/Analysis/LazyValueInfo.cpp
Modified: llvm/trunk/lib/Analysis/LazyValueInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LazyValueInfo.cpp?rev=288874&r1=288873&r2=288874&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/LazyValueInfo.cpp (original)
+++ llvm/trunk/lib/Analysis/LazyValueInfo.cpp Tue Dec 6 19:03:56 2016
@@ -141,37 +141,36 @@ public:
}
private:
- /// Return true if this is a change in status.
- bool markOverdefined() {
+ void markOverdefined() {
if (isOverdefined())
- return false;
+ return;
Tag = overdefined;
- return true;
}
- /// Return true if this is a change in status.
- bool markConstant(Constant *V) {
+ void markConstant(Constant *V) {
assert(V && "Marking constant with NULL");
- if (ConstantInt *CI = dyn_cast<ConstantInt>(V))
- return markConstantRange(ConstantRange(CI->getValue()));
+ if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) {
+ markConstantRange(ConstantRange(CI->getValue()));
+ return;
+ }
if (isa<UndefValue>(V))
- return false;
+ return;
assert((!isConstant() || getConstant() == V) &&
"Marking constant with different value");
assert(isUndefined());
Tag = constant;
Val = V;
- return true;
}
- /// Return true if this is a change in status.
- bool markNotConstant(Constant *V) {
+ void markNotConstant(Constant *V) {
assert(V && "Marking constant with NULL");
- if (ConstantInt *CI = dyn_cast<ConstantInt>(V))
- return markConstantRange(ConstantRange(CI->getValue()+1, CI->getValue()));
+ if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) {
+ markConstantRange(ConstantRange(CI->getValue()+1, CI->getValue()));
+ return;
+ }
if (isa<UndefValue>(V))
- return false;
+ return;
assert((!isConstant() || getConstant() != V) &&
"Marking constant !constant with same value");
@@ -180,27 +179,26 @@ private:
assert(isUndefined() || isConstant());
Tag = notconstant;
Val = V;
- return true;
}
- /// Return true if this is a change in status.
- bool markConstantRange(ConstantRange NewR) {
+ void markConstantRange(ConstantRange NewR) {
if (isConstantRange()) {
if (NewR.isEmptySet())
- return markOverdefined();
-
- bool changed = Range != NewR;
- Range = std::move(NewR);
- return changed;
+ markOverdefined();
+ else {
+ bool changed = Range != NewR;
+ Range = std::move(NewR);
+ }
+ return;
}
assert(isUndefined());
if (NewR.isEmptySet())
- return markOverdefined();
-
- Tag = constantrange;
- Range = std::move(NewR);
- return true;
+ markOverdefined();
+ else {
+ Tag = constantrange;
+ Range = std::move(NewR);
+ }
}
public:
More information about the llvm-commits
mailing list