GCC Middle and Back End API Reference
op_by_pieces_d Class Referenceabstract
Inheritance diagram for op_by_pieces_d:
Collaboration diagram for op_by_pieces_d:

Public Member Functions

 op_by_pieces_d (unsigned int, rtx, bool, rtx, bool, by_pieces_constfn, void *, unsigned HOST_WIDE_INT, unsigned int, bool, by_pieces_operation)
void run ()

Protected Member Functions

virtual void generate (rtx, rtx, machine_mode)=0
virtual bool prepare_mode (machine_mode, unsigned int)=0
virtual void finish_mode (machine_mode)

Protected Attributes

pieces_addr m_to
pieces_addr m_from
const unsigned HOST_WIDE_INT m_len
HOST_WIDE_INT m_offset
unsigned int m_align
unsigned int m_max_size
bool m_reverse
bool m_push
bool m_overlap_op_by_pieces
by_pieces_operation m_op

Private Member Functions

fixed_size_mode get_usable_mode (fixed_size_mode, unsigned int)
fixed_size_mode smallest_fixed_size_mode_for_size (unsigned int)

Detailed Description

This structure is used by do_op_by_pieces to describe the operation
to be performed.   

Constructor & Destructor Documentation

◆ op_by_pieces_d()

op_by_pieces_d::op_by_pieces_d ( unsigned int max_pieces,
rtx to,
bool to_load,
rtx from,
bool from_load,
by_pieces_constfn from_cfn,
void * from_cfn_data,
unsigned HOST_WIDE_INT len,
unsigned int align,
bool push,
by_pieces_operation op )
The constructor for an op_by_pieces_d structure.  We require two
objects named TO and FROM, which are identified as loads or stores
by TO_LOAD and FROM_LOAD.  If FROM is a load, the optional FROM_CFN
and its associated FROM_CFN_DATA can be used to replace loads with
constant values.  MAX_PIECES describes the maximum number of bytes
at a time which can be moved efficiently.  LEN describes the length
of the operation.   

References alignment_for_piecewise_move(), by_pieces_ninsns(), pieces_addr::decide_autoinc(), gcc_unreachable, pieces_addr::get_addr_inc(), ggc_alloc(), m_align, m_from, m_max_size, m_offset, m_op, m_overlap_op_by_pieces, m_reverse, m_to, MEM_ALIGN, MIN, MOVE_BY_PIECES, MOVE_MAX_PIECES, targetm, and widest_fixed_size_mode_for_size().

Member Function Documentation

◆ finish_mode()

virtual void op_by_pieces_d::finish_mode ( machine_mode )

Reimplemented in compare_by_pieces_d.

Referenced by run().

◆ generate()

virtual void op_by_pieces_d::generate ( rtx ,
rtx ,
machine_mode  )
protectedpure virtual

◆ get_usable_mode()

fixed_size_mode op_by_pieces_d::get_usable_mode ( fixed_size_mode mode,
unsigned int len )
This function returns the largest usable integer mode for LEN bytes
whose size is no bigger than size of MODE.   

References GET_MODE_SIZE(), m_align, m_op, prepare_mode(), and widest_fixed_size_mode_for_size().

Referenced by run().

◆ prepare_mode()

virtual bool op_by_pieces_d::prepare_mode ( machine_mode ,
unsigned int  )
protectedpure virtual

◆ run()

void op_by_pieces_d::run ( )
This function contains the main loop used for expanding a block
operation.  First move what we can in the largest integer mode,
then go to successively smaller modes.  For every access, call
GENFUN with the two operands and the EXTRA_DATA.   

References pieces_addr::adjust(), finish_mode(), generate(), GET_MODE_SIZE(), get_usable_mode(), ggc_alloc(), m_from, m_len, m_max_size, m_offset, m_op, m_overlap_op_by_pieces, m_push, m_reverse, m_to, pieces_addr::maybe_postinc(), pieces_addr::maybe_predec(), NULL_RTX, smallest_fixed_size_mode_for_size(), and widest_fixed_size_mode_for_size().

◆ smallest_fixed_size_mode_for_size()

fixed_size_mode op_by_pieces_d::smallest_fixed_size_mode_for_size ( unsigned int size)
Return the smallest integer or QI vector mode that is not narrower
than SIZE bytes.   

References by_pieces_mode_supported_p(), can_use_qi_vectors(), candidate(), FOR_EACH_MODE_IN_CLASS, GET_MODE_INNER, GET_MODE_SIZE(), ggc_alloc(), m_len, m_op, and smallest_int_mode_for_size().

Referenced by run().

Field Documentation

◆ m_align

unsigned int op_by_pieces_d::m_align

Referenced by get_usable_mode(), and op_by_pieces_d().

◆ m_from

pieces_addr op_by_pieces_d::m_from

Referenced by op_by_pieces_d(), and run().

◆ m_len

const unsigned HOST_WIDE_INT op_by_pieces_d::m_len

◆ m_max_size

unsigned int op_by_pieces_d::m_max_size

Referenced by op_by_pieces_d(), and run().

◆ m_offset

◆ m_op

◆ m_overlap_op_by_pieces

bool op_by_pieces_d::m_overlap_op_by_pieces

Referenced by op_by_pieces_d(), and run().

◆ m_push

bool op_by_pieces_d::m_push

Referenced by run().

◆ m_reverse

bool op_by_pieces_d::m_reverse

◆ m_to

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