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_INTget_val () const
 
unsigned int get_len () const
 
HOST_WIDE_INTwrite_val (unsigned int)
 
void set_len (unsigned int, bool=false)
 
wide_int_storageoperator= (const wide_int_storage &)
 
template<typename T >
wide_int_storageoperator= (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 { 
 
   HOST_WIDE_INT   val [WIDE_INT_MAX_INL_ELTS
 
   HOST_WIDE_INT *   valp 
 
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

◆ 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(), ggc_alloc(), 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()

◆ 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(), ggc_alloc(), len, precision, set_len(), val, 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

References len.

Referenced by pass_walloca::execute(), and streamer_write_wide_int().

◆ get_precision()

◆ get_val()

const HOST_WIDE_INT * wide_int_storage::get_val ( ) const
inline

◆ operator=() [1/2]

◆ operator=() [2/2]

◆ 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

◆ [union]

◆ val

HOST_WIDE_INT wide_int_storage::val[WIDE_INT_MAX_INL_ELTS]

Referenced by from_array().

◆ valp

HOST_WIDE_INT* wide_int_storage::valp

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


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