Next:Comparing orderedpoly_ints, Previous:Properties of thepoly_int comparisons, Up:Comparisons involvingpoly_int [Contents][Index]
poly_ints ¶In cases where there is no definite link between twopoly_ints,we can usually make a conservatively-correct assumption. For example,the conservative assumption for alias analysis is that two referencesmight alias.
One way of checking whether [begin1,end1) might overlap[begin2,end2) using thepoly_int comparisons is:
maybe_gt (end1,begin2) && maybe_gt (end2,begin1)
and another (equivalent) way is:
!(known_le (end1,begin2) || known_le (end2,begin1))
However, in this particular example, it is better to use the range helperfunctions instead. SeeRange checks onpoly_ints.