GCC Middle and Back End API Reference
poly-int-types.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define bits_to_bytes_round_down(X)
 
#define bits_to_bytes_round_up(X)
 
#define num_trailing_bits(X)
 
#define round_down_to_byte_boundary(X)
 
#define round_up_to_byte_boundary(X)
 
#define vector_element_size(SIZE, NELTS)
 
#define vector_unroll_factor(NELTS1, NELTS2)
 
#define MACRO_INT(X)
 

Typedefs

typedef poly_int< NUM_POLY_INT_COEFFS, unsigned short > poly_uint16
 
typedef poly_int< NUM_POLY_INT_COEFFS, HOST_WIDE_INT > poly_int64
 
typedef poly_int< NUM_POLY_INT_COEFFS, unsigned HOST_WIDE_INT > poly_uint64
 
typedef poly_int< NUM_POLY_INT_COEFFS, offset_int > poly_offset_int
 
typedef poly_int< NUM_POLY_INT_COEFFS, wide_intpoly_wide_int
 
typedef poly_int< NUM_POLY_INT_COEFFS, wide_int_refpoly_wide_int_ref
 
typedef poly_int< NUM_POLY_INT_COEFFS, widest_intpoly_widest_int
 

Macro Definition Documentation

◆ bits_to_bytes_round_down

#define bits_to_bytes_round_down ( X)
Value:
force_align_down_and_div (X, BITS_PER_UNIT)
Divide bit quantity X by BITS_PER_UNIT and round down (towards -Inf). If X is a bit size, this gives the number of whole bytes spanned by X. This is safe because non-constant mode sizes must be a whole number of bytes in size.

Referenced by expand_assignment(), expand_debug_expr(), expand_expr_real_1(), extract_base_bit_offset(), extract_bit_field_1(), get_inner_reference(), get_inner_reference_aff(), make_extraction(), maybe_instrument_pointer_overflow(), pointer_may_wrap_p(), and set_mem_attributes_minus_bitpos().

◆ bits_to_bytes_round_up

#define bits_to_bytes_round_up ( X)
Value:
force_align_up_and_div (X, BITS_PER_UNIT)
Divide bit quantity X by BITS_PER_UNIT and round up (towards +Inf). If X is a bit size, this gives the number of whole or partial bytes spanned by X. This is safe because non-constant mode sizes must be a whole number of bytes in size.

Referenced by expand_expr_real_1(), extract_bit_field_1(), get_inner_reference_aff(), store_bit_field(), and store_field().

◆ MACRO_INT

#define MACRO_INT ( X)
Value:
(X)
Wrapper for poly_int arguments to target macros, so that if a target doesn't need polynomial-sized modes, its header file can continue to treat the argument as a normal constant. This should go away once macros are moved to target hooks. It shouldn't be used in other contexts.

Referenced by push_operand().

◆ num_trailing_bits

#define num_trailing_bits ( X)
Value:
force_get_misalignment (X, BITS_PER_UNIT)
Return the number of bits in bit quantity X that do not belong to whole bytes. This is equivalent to: X - bits_to_bytes_round_down (X) * BITS_PER_UNIT This is safe because non-constant mode sizes must be a whole number of bytes in size.

Referenced by expand_assignment(), expand_debug_expr(), expand_expr_real_1(), extract_bit_field_1(), and get_inner_reference().

◆ round_down_to_byte_boundary

#define round_down_to_byte_boundary ( X)
Value:
force_align_down (X, BITS_PER_UNIT)
Round bit quantity X down to the nearest byte boundary. This is safe because non-constant mode sizes must be a whole number of bytes in size.

◆ round_up_to_byte_boundary

#define round_up_to_byte_boundary ( X)
Value:
force_align_up (X, BITS_PER_UNIT)
Round bit quantity X up the nearest byte boundary. This is safe because non-constant mode sizes must be a whole number of bytes in size.

◆ vector_element_size

#define vector_element_size ( SIZE,
NELTS )
Value:
(exact_div (SIZE, NELTS).to_constant ())
Return the size of an element in a vector of size SIZE, given that the vector has NELTS elements. The return value is in the same units as SIZE (either bits or bytes). to_constant () is safe in this situation because vector elements are always constant-sized scalars.

Referenced by build_truth_vector_type_for(), build_truth_vector_type_for_mode(), fold_view_convert_vector_encoding(), native_decode_vector_rtx(), native_encode_rtx(), simplify_const_vector_byte_offset(), simplify_const_vector_subreg(), vect_recog_bool_pattern(), and vector_alignment_reachable_p().

◆ vector_unroll_factor

#define vector_unroll_factor ( NELTS1,
NELTS2 )
Value:
(exact_div (NELTS1, NELTS2).to_constant ())
Return the number of unroll times when a vector that has NELTS1 elements is unrolled to vectors that have NELTS2 elements. to_constant () is safe in this situation because the multiples of the NELTS of two vectors are always constant-size scalars.

Referenced by ipa_simd_modify_function_body(), simd_clone_adjust(), simd_clone_adjust_argument_types(), simd_clone_init_simd_arrays(), and vectorizable_simd_clone_call().

Typedef Documentation

◆ poly_int64

typedef poly_int<NUM_POLY_INT_COEFFS, HOST_WIDE_INT> poly_int64

◆ poly_offset_int

◆ poly_uint16

typedef poly_int<NUM_POLY_INT_COEFFS, unsigned short> poly_uint16
Typedefs for polynomial integers used in GCC. Copyright (C) 2016-2025 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>.

◆ poly_uint64

typedef poly_int<NUM_POLY_INT_COEFFS, unsigned HOST_WIDE_INT> poly_uint64

◆ poly_wide_int

◆ poly_wide_int_ref

◆ poly_widest_int