[PATCH] D59959: [ConstantRange] Add unsigned and signed intersection type

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 6 08:59:13 PDT 2019


lebedev.ri added a comment.

In D59959#1457362 <https://reviews.llvm.org/D59959#1457362>, @nikic wrote:

> In D59959#1457360 <https://reviews.llvm.org/D59959#1457360>, @lebedev.ri wrote:
>
> > In D59959#1457356 <https://reviews.llvm.org/D59959#1457356>, @nikic wrote:
> >
> > > I think I'd like to make two more changes here: Rename `IntersectionType` to `OperationType` or similar, as the Smallest/Unsigned/Signed classification will be useful in other places as well (e.g. it is also directly applicable to unions).
> >
> >
> > So i agree that `IntersectionType` will be misleading for other ops. But operation is a bit too generic maybe?
> >  We are saying "please intersect these two ranges, and out of all the intersections (common elements? overlapped elements?, ???), //try// to pick smallest/one with no wrap/...".
> >  So i wonder if it would be better not to talk about *operation*, but about the result of operation?
> >  How does e.g. `DesiredRangeVariant` sound?
>
>
> Yes, I agree that it makes more sense to talk about the result here. `PreferredRangeType` would be another possibility, which matches the terminology in the implementation.


Yes, that also is a good alternative.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59959/new/

https://reviews.llvm.org/D59959





More information about the llvm-commits mailing list