[PATCH] D60947: [ConstantRange] Add getNonEmpty() constructor
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 21 05:22:15 PDT 2019
nikic created this revision.
nikic added a reviewer: lebedev.ri.
Herald added subscribers: llvm-commits, sanjoy, hiraditya.
Herald added a project: LLVM.
ConstantRanges have an annoying special case: If upper and lower are the same, it can be either an empty or a full set. When constructing constant ranges nearly always a full set is intended. This requires an explicit check in many places.
This revision adds a `getNonEmpty()` constructor that disambiguates this case: If upper and lower are the same, a full set is created.
Repository:
rL LLVM
https://reviews.llvm.org/D60947
Files:
llvm/include/llvm/IR/ConstantRange.h
llvm/lib/Analysis/ScalarEvolution.cpp
llvm/lib/Analysis/ValueTracking.cpp
llvm/lib/IR/ConstantRange.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60947.195997.patch
Type: text/x-patch
Size: 7130 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190421/5ab66e09/attachment.bin>
More information about the llvm-commits
mailing list