GCC Middle and Back End API Reference
wide_int_storage Class Reference

#include <wide-int.h>

Inheritance diagram for wide_int_storage:

Public Member Functions

 wide_int_storage ()
template<typename T>
 wide_int_storage (const T &)
 wide_int_storage (const wide_int_storage &)
 ~wide_int_storage ()
unsigned int get_precision () const
const HOST_WIDE_INT * get_val () const
unsigned int get_len () const
HOST_WIDE_INT * write_val (unsigned int)
void set_len (unsigned int, bool=false)
wide_int_storage & operator= (const wide_int_storage &)
template<typename T>
wide_int_storage & operator= (const T &)

Static Public Member Functions

static wide_int from (const wide_int_ref &, unsigned int, signop)
static wide_int from_array (const HOST_WIDE_INT *, unsigned int, unsigned int, bool=true)
static wide_int create (unsigned int)

Private Attributes

union wide_int_storage:: { ... }  u
unsigned int len
unsigned int precision

Detailed Description

The storage used by wide_int.   

Constructor & Destructor Documentation

◆ wide_int_storage() [1/3]

wide_int_storage::wide_int_storage ( )
inline

References precision.

Referenced by operator=(), and wide_int_storage().

◆ wide_int_storage() [2/3]

template<typename T>
wide_int_storage::wide_int_storage ( const T & x)
inline
Initialize the storage from integer X, in its natural precision.
Note that we do not allow integers with host-dependent precision
to become wide_ints; wide_ints must always be logically independent
of the host.   

References CEIL, wi::CONST_PRECISION, wi::copy(), HOST_BITS_PER_WIDE_INT, wi::INL_CONST_PRECISION, precision, STATIC_ASSERT(), u, UNLIKELY, WIDE_INT_MAX_INL_PRECISION, and WIDE_INT_REF_FOR.

◆ wide_int_storage() [3/3]

wide_int_storage::wide_int_storage ( const wide_int_storage & x)
inline

◆ ~wide_int_storage()

wide_int_storage::~wide_int_storage ( )
inline

Member Function Documentation

◆ create()

wide_int wide_int_storage::create ( unsigned int precision)
inlinestatic

◆ from()

wide_int wide_int_storage::from ( const wide_int_ref & x,
unsigned int precision,
signop sgn )
inlinestatic
Treat X as having signedness SGN and convert it to a PRECISION-bit
number.   

References create(), wi::force_to_size(), wi::storage_ref::len, wi::storage_ref::precision, precision, set_len(), wi::storage_ref::val, and write_val().

Referenced by wi::bit_compress(), wi::bit_expand(), wi::bit_repeat(), ccp_finalize(), wi::clmul(), tree_switch_conversion::switch_conversion::contains_linear_function_p(), convert_modes(), decode_field_reference(), evaluate_stmt(), expand_clmul(), expand_doubleword_divmod(), expand_expr_divmod(), fixed_to_decimal(), fold_binary_loc(), fold_build_builtin_clmulg(), fold_const_call(), fold_const_call_ss(), operator_cast::fold_pair(), fold_string_char_compare(), fold_truth_andor_for_ifcombine(), fold_unary_loc(), get_size_range(), wi::insert(), int_const_convert(), ipa_compute_jump_functions_for_edge(), ipcp_store_vr_results(), is_widening_mult_rhs_p(), iv_can_overflow_p(), lower_omp_ordered_clauses(), maybe_optimize_mod_cmp(), wi::mod_inv(), omp_apply_tile(), operator_cast::op1_range(), output_constant(), range_of_var_in_loop(), real_convert_from_fixed(), real_from_integer(), real_to_integer(), reload_cse_simplify_set(), simplify_const_unary_operation(), simplify_rotate(), wi::to_wide(), tree_nonzero_bits(), update_known_bitmask(), value_range_from_overflowed_bounds(), value_range_with_overflow(), vect_determine_precisions_from_range(), operator_mult::wi_fold(), operator_widen_mult_signed::wi_fold(), operator_widen_mult_signed_unsigned::wi_fold(), operator_widen_mult_unsigned::wi_fold(), operator_widen_plus_signed::wi_fold(), operator_widen_plus_unsigned::wi_fold(), and wide_int_to_tree_1().

◆ from_array()

wide_int wide_int_storage::from_array ( const HOST_WIDE_INT * val,
unsigned int len,
unsigned int precision,
bool need_canon_p = true )
inlinestatic
Create a wide_int from the explicit block encoding given by VAL and
LEN.  PRECISION is the precision of the integer.  NEED_CANON_P is
true if the encoding may have redundant trailing blocks.   

References create(), wi::from_array(), len, precision, set_len(), and write_val().

Referenced by build_replicated_int_cst(), gimple_divmod_fixed_value_transform(), gimple_stringops_transform(), lto_input_tree_1(), make_tree(), output_addr_const(), real_to_integer(), and streamer_read_wide_int().

◆ get_len()

unsigned int wide_int_storage::get_len ( ) const
inline

◆ get_precision()

◆ get_val()

const HOST_WIDE_INT * wide_int_storage::get_val ( ) const
inline

◆ operator=() [1/2]

◆ operator=() [2/2]

wide_int_storage & wide_int_storage::operator= ( const wide_int_storage & x)
inline

◆ set_len()

void wide_int_storage::set_len ( unsigned int l,
bool is_sign_extended = false )
inline

◆ write_val()

HOST_WIDE_INT * wide_int_storage::write_val ( unsigned int )
inline

Field Documentation

◆ len

unsigned int wide_int_storage::len
private

◆ precision

◆ u


The documentation for this class was generated from the following file: