Next: Checking for a <code>poly_int</code> marker value, Previous: Comparing potentially-unordered <code>poly_int</code>s, Up: Comparisons involving <code>poly_int</code>
poly_int
sIn cases where there is a definite link between two poly_int
s,
such as the outer and inner sizes of subregs, we usually require the sizes
to be ordered by the known_le
partial order. poly_int
provides
the following utility functions for ordered values:
known_le
partial order.
known_le
and return the
minimum of the two. When using this function, please add a comment explaining
why the values are known to be ordered.
known_le
and return the
maximum of the two. When using this function, please add a comment explaining
why the values are known to be ordered.
For example, if a subreg has an outer mode of size outer and an inner mode of size inner:
Thus the subreg is only valid if `ordered_p (outer, inner)' is true. If this condition is already known to be true then:
with the three conditions being mutually exclusive.
Code that checks whether a subreg is valid would therefore generally
check whether ordered_p
holds (in addition to whatever other
checks are required for subreg validity). Code that is dealing
with existing subregs can assert that ordered_p
holds
and use either of the classifications above.