[ConstantRange] Add getFull() + getEmpty() named constructors; NFC
authorNikita Popov <nikita.ppv@gmail.com>
Sun, 24 Mar 2019 09:34:40 +0000 (09:34 +0000)
committerNikita Popov <nikita.ppv@gmail.com>
Sun, 24 Mar 2019 09:34:40 +0000 (09:34 +0000)
commit977934f00f7cac6476650db75f6497495908b486
tree92c865ad86f73d4314bf45c53b4ae5dcf3a2ff88
parent54ce1b18c5f77002a1f0bc1fefa076109df8b847
[ConstantRange] Add getFull() + getEmpty() named constructors; NFC

This adds ConstantRange::getFull(BitWidth) and
ConstantRange::getEmpty(BitWidth) named constructors as more readable
alternatives to the current ConstantRange(BitWidth, /* full */ false)
and similar. Additionally private getFull() and getEmpty() member
functions are added which return a full/empty range with the same bit
width -- these are commonly needed inside ConstantRange.cpp.

The IsFullSet argument in the ConstantRange(BitWidth, IsFullSet)
constructor is now mandatory for the few usages that still make use of it.

Differential Revision: https://reviews.llvm.org/D59716

llvm-svn: 356852
llvm/include/llvm/IR/ConstantRange.h
llvm/lib/Analysis/LazyValueInfo.cpp
llvm/lib/Analysis/ScalarEvolution.cpp
llvm/lib/Analysis/ValueTracking.cpp
llvm/lib/IR/ConstantRange.cpp
llvm/lib/IR/Verifier.cpp
llvm/lib/Transforms/Scalar/Float2Int.cpp
llvm/unittests/IR/ConstantRangeTest.cpp