Next: Computing bounds on <code>poly_int</code>s, Previous: Arithmetic on <code>poly_int</code>s, Up: poly_int
poly_int
spoly_int
provides various routines for aligning values and for querying
misalignments. In each case the alignment must be a power of 2.
can_align_p
; if so, set aligned to the greatest
aligned value that is less than or equal to value.
can_align_p
; if so, set aligned to the lowest
aligned value that is greater than or equal to value.
For example, suppose we are allocating an object of size bytes in a downward-growing stack whose current limit is given by limit. If the object requires align bytes of alignment, the new stack limit is given by:
aligned_lower_bound (limit - size, align)
force_align_down
by align. Again,
please add a comment explaining why the assertion in force_align_down
is known to hold.
force_align_up
.