diff options
author | Davide Italiano <davide@freebsd.org> | 2016-05-25 22:29:34 +0000 |
---|---|---|
committer | Davide Italiano <davide@freebsd.org> | 2016-05-25 22:29:34 +0000 |
commit | bd543d0a0b1a55f5b8c2d22e0c303ebc3002b9b5 (patch) | |
tree | 62a12c31168dd1ece1874eedba22bc2694b1df3e | |
parent | e0fc5aef18948ae7193166cdfc8f069cd828399d (diff) | |
download | bcm5719-llvm-bd543d0a0b1a55f5b8c2d22e0c303ebc3002b9b5.tar.gz bcm5719-llvm-bd543d0a0b1a55f5b8c2d22e0c303ebc3002b9b5.zip |
[LazyValueInfo] Simplify `return after else`. NFCI.
llvm-svn: 270779
-rw-r--r-- | llvm/lib/Analysis/LazyValueInfo.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/Analysis/LazyValueInfo.cpp b/llvm/lib/Analysis/LazyValueInfo.cpp index cb26da55c87..041481411a4 100644 --- a/llvm/lib/Analysis/LazyValueInfo.cpp +++ b/llvm/lib/Analysis/LazyValueInfo.cpp @@ -287,7 +287,7 @@ raw_ostream &operator<<(raw_ostream &OS, const LVILatticeVal &Val) { if (Val.isNotConstant()) return OS << "notconstant<" << *Val.getNotConstant() << '>'; - else if (Val.isConstantRange()) + if (Val.isConstantRange()) return OS << "constantrange<" << Val.getConstantRange().getLower() << ", " << Val.getConstantRange().getUpper() << '>'; return OS << "constant<" << *Val.getConstant() << '>'; @@ -678,7 +678,7 @@ bool LazyValueInfoCache::solveBlockValue(Value *Val, BasicBlock *BB) { insertResult(Val, BB, Res); return true; } - else if (BBI->getType()->isIntegerTy()) { + if (BBI->getType()->isIntegerTy()) { if (isa<CastInst>(BBI)) { if (!solveBlockValueCast(Res, BBI, BB)) return false; @@ -1497,8 +1497,7 @@ ConstantRange LazyValueInfo::getConstantRange(Value *V, BasicBlock *BB, return ConstantRange(Width, /*isFullSet=*/false); if (Result.isConstantRange()) return Result.getConstantRange(); - else - return ConstantRange(Width, /*isFullSet=*/true); + return ConstantRange(Width, /*isFullSet=*/true); } /// Determine whether the specified value is known to be a |