GCC Middle and Back End API Reference
bit_field_mode_iterator Class Reference

#include <machmode.h>

Public Member Functions

 bit_field_mode_iterator (HOST_WIDE_INT, HOST_WIDE_INT, HOST_WIDE_INT, HOST_WIDE_INT, unsigned int, bool)
bool next_mode (enum machine_mode *)
bool prefer_smaller_modes ()

Private Attributes

enum machine_mode mode_
HOST_WIDE_INT bitsize_
HOST_WIDE_INT bitpos_
HOST_WIDE_INT bitregion_start_
HOST_WIDE_INT bitregion_end_
unsigned int align_
bool volatilep_
int count_

Detailed Description

A class for iterating through possible bitfield modes.   

Constructor & Destructor Documentation

bit_field_mode_iterator::bit_field_mode_iterator ( HOST_WIDE_INT  bitsize,
HOST_WIDE_INT  bitpos,
HOST_WIDE_INT  bitregion_start,
HOST_WIDE_INT  bitregion_end,
unsigned int  align,
bool  volatilep 
)
Construct an iterator for a bitfield that spans BITSIZE bits,
   starting at BITPOS.

   BITREGION_START is the bit position of the first bit in this
   sequence of bit fields.  BITREGION_END is the last bit in this
   sequence.  If these two fields are non-zero, we should restrict the
   memory access to that range.  Otherwise, we are allowed to touch
   any adjacent non bit-fields.

   ALIGN is the alignment of the underlying object in bits.
   VOLATILEP says whether the bitfield is volatile.   

References HOST_WIDE_INT.


Member Function Documentation

bool bit_field_mode_iterator::next_mode ( enum machine_mode *  out_mode)
Calls to this function return successively larger modes that can be used
   to represent the bitfield.  Return true if another bitfield mode is
   available, storing it in *OUT_MODE if so.   

References align_, bitpos_, bitregion_end_, bitregion_start_, bitsize_, count_, HOST_WIDE_INT, and mode_.

Referenced by adjust_bit_field_mem_for_reg(), and get_best_mode().

bool bit_field_mode_iterator::prefer_smaller_modes ( )
Return true if smaller modes are generally preferred for this kind
   of bitfield.   

References targetm, and volatilep_.

Referenced by adjust_bit_field_mem_for_reg(), and get_best_mode().


Field Documentation

unsigned int bit_field_mode_iterator::align_
private

Referenced by next_mode().

HOST_WIDE_INT bit_field_mode_iterator::bitpos_
private

Referenced by next_mode().

HOST_WIDE_INT bit_field_mode_iterator::bitregion_end_
private

Referenced by next_mode().

HOST_WIDE_INT bit_field_mode_iterator::bitregion_start_
private

Referenced by next_mode().

HOST_WIDE_INT bit_field_mode_iterator::bitsize_
private

Referenced by next_mode().

int bit_field_mode_iterator::count_
private

Referenced by next_mode().

enum machine_mode bit_field_mode_iterator::mode_
private

Referenced by next_mode().

bool bit_field_mode_iterator::volatilep_
private

Referenced by prefer_smaller_modes().


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