GCC Middle and Back End API Reference
vec_rtx_properties_base Class Reference

#include <rtlanal.h>

Inheritance diagram for vec_rtx_properties_base:
Collaboration diagram for vec_rtx_properties_base:

Public Member Functions

 vec_rtx_properties_base ()
 
 ~vec_rtx_properties_base ()
 
void try_to_add_reg (const_rtx x, unsigned int flags=0)
 
void try_to_add_dest (const_rtx x, unsigned int flags=0)
 
void try_to_add_src (const_rtx x, unsigned int flags=0)
 
void try_to_add_pattern (const_rtx pat)
 
void try_to_add_note (const_rtx x)
 
void try_to_add_insn (const rtx_insn *insn, bool include_notes)
 
iterator_range< rtx_obj_reference * > refs () const
 
size_t num_refs () const
 
bool has_side_effects () const
 

Data Fields

rtx_obj_referenceref_begin
 
rtx_obj_referenceref_iter
 
rtx_obj_referenceref_end
 
unsigned int has_asm: 1
 
unsigned int has_call: 1
 
unsigned int has_pre_post_modify: 1
 
unsigned int has_volatile_refs: 1
 
unsigned int spare: 28
 

Protected Member Functions

void grow (ptrdiff_t)
 

Private Attributes

rtx_obj_reference m_storage [SIZE]
 

Static Private Attributes

static const size_t SIZE = 32
 

Detailed Description

A base class for vec_rtx_properties; see there for details.

Constructor & Destructor Documentation

◆ vec_rtx_properties_base()

vec_rtx_properties_base::vec_rtx_properties_base ( )
inline

◆ ~vec_rtx_properties_base()

vec_rtx_properties_base::~vec_rtx_properties_base ( )
inline

Member Function Documentation

◆ grow()

void vec_rtx_properties_base::grow ( ptrdiff_t start)
protected
Grow the storage by a bit while keeping the contents of the first START elements.

References m_storage, rtx_properties::ref_begin, rtx_properties::ref_end, and rtx_properties::ref_iter.

◆ has_side_effects()

bool rtx_properties::has_side_effects ( ) const
inlineinherited
Return true if the rtx has side effects, in the sense of side_effects_p (except for side_effects_p's special handling of combine.cc clobbers).

References has_call, has_pre_post_modify, and has_volatile_refs.

◆ num_refs()

size_t rtx_properties::num_refs ( ) const
inlineinherited

References ref_begin, and ref_iter.

◆ refs()

iterator_range< rtx_obj_reference * > rtx_properties::refs ( ) const
inlineinherited
Return an iterator range for all the references, suitable for range-based for loops.

References ref_begin, and ref_iter.

◆ try_to_add_dest()

void rtx_properties::try_to_add_dest ( const_rtx x,
unsigned int flags = 0 )
inherited
Add a description of destination X to this object. FLAGS is a bitmask of rtx_obj_reference flags that describe the context. This routine accepts all rtxes that can legitimately appear in a SET_DEST.

References GET_CODE, GET_MODE, i, rtx_obj_flags::IN_MEM_LOAD, rtx_obj_flags::IN_MEM_STORE, rtx_obj_flags::IN_SUBREG, rtx_obj_flags::IS_READ, rtx_obj_flags::IS_WRITE, LIKELY, MEM_P, MEM_REGNO, read_modify_subreg_p(), ref_end, ref_iter, REG_P, REGNO, rtx_obj_flags::STICKY_FLAGS, SUBREG_REG, try_to_add_dest(), try_to_add_reg(), try_to_add_src(), UNLIKELY, XEXP, XVECEXP, and XVECLEN.

Referenced by try_to_add_dest(), try_to_add_insn(), try_to_add_pattern(), and try_to_add_src().

◆ try_to_add_insn()

void rtx_properties::try_to_add_insn ( const rtx_insn * insn,
bool include_notes )
inherited
Try to add a description of INSN to this object, stopping once the REF_END limit has been reached. INCLUDE_NOTES is true if the description should include REG_EQUAL and REG_EQUIV notes; all such references will then be marked with rtx_obj_flags::IN_NOTE. For calls, this description includes all accesses in CALL_INSN_FUNCTION_USAGE. It also include all implicit accesses to global registers by the target function. However, it does not include clobbers performed by the target function; callers that want this information should instead use the function_abi interface.

References CALL_INSN_FUNCTION_USAGE, CALL_P, find_reg_note(), GET_CODE, global_reg_set, global_regs, hard_reg_set_empty_p(), rtx_obj_flags::IS_CLOBBER, rtx_obj_flags::IS_READ, rtx_obj_flags::IS_WRITE, MEM_REGNO, NULL_RTX, PATTERN(), ref_end, ref_iter, REG_NOTE_KIND, REG_NOTES, reg_raw_mode, RTL_CONST_CALL_P, RTL_PURE_CALL_P, targetm, try_to_add_dest(), try_to_add_note(), try_to_add_pattern(), try_to_add_src(), and XEXP.

◆ try_to_add_note()

void rtx_properties::try_to_add_note ( const_rtx x)
inlineinherited
Like add_src, but treat X has being part of a REG_EQUAL or REG_EQUIV note.

References rtx_obj_flags::IN_NOTE, and try_to_add_src().

Referenced by try_to_add_insn().

◆ try_to_add_pattern()

void rtx_properties::try_to_add_pattern ( const_rtx pat)
inherited
Try to add a description of instruction pattern PAT to this object, stopping once the REF_END limit has been reached.

References ASM_OPERANDS_INPUT, ASM_OPERANDS_INPUT_LENGTH, COND_EXEC_CODE, COND_EXEC_TEST, GET_CODE, i, rtx_obj_flags::IS_CLOBBER, last, SET, SET_DEST, SET_SRC, try_to_add_dest(), try_to_add_pattern(), try_to_add_src(), XEXP, XVECEXP, and XVECLEN.

Referenced by try_to_add_insn(), and try_to_add_pattern().

◆ try_to_add_reg()

void rtx_properties::try_to_add_reg ( const_rtx x,
unsigned int flags = 0 )
inherited
Try to add a description of REG X to this object, stopping once the REF_END limit has been reached. FLAGS is a bitmask of rtx_obj_reference flags that describe the context.

References END_REGNO(), GET_MODE, rtx_obj_flags::IS_MULTIREG, ref_end, ref_iter, REG_NREGS, and REGNO.

Referenced by try_to_add_dest(), and try_to_add_src().

◆ try_to_add_src()

void rtx_properties::try_to_add_src ( const_rtx x,
unsigned int flags = 0 )
inherited
Try to add a description of source X to this object, stopping once the REF_END limit has been reached. FLAGS is a bitmask of rtx_obj_reference flags that describe the context. This routine accepts all rtxes that can legitimately appear in a SET_SRC.

References FOR_EACH_SUBRTX, GET_CODE, GET_MODE, has_asm, has_call, has_pre_post_modify, has_volatile_refs, rtx_obj_flags::IN_MEM_LOAD, rtx_obj_flags::IN_SUBREG, rtx_obj_flags::IS_PRE_POST_MODIFY, rtx_obj_flags::IS_READ, MEM_READONLY_P, MEM_REGNO, MEM_VOLATILE_P, ref_end, ref_iter, rtx_obj_flags::STICKY_FLAGS, SUBREG_REG, try_to_add_dest(), try_to_add_reg(), try_to_add_src(), and XEXP.

Referenced by try_to_add_dest(), try_to_add_insn(), try_to_add_note(), try_to_add_pattern(), and try_to_add_src().

Field Documentation

◆ has_asm

unsigned int rtx_properties::has_asm
inherited

Referenced by rtx_properties(), and try_to_add_src().

◆ has_call

unsigned int rtx_properties::has_call
inherited

◆ has_pre_post_modify

unsigned int rtx_properties::has_pre_post_modify
inherited

◆ has_volatile_refs

unsigned int rtx_properties::has_volatile_refs
inherited

◆ m_storage

rtx_obj_reference vec_rtx_properties_base::m_storage[SIZE]
private

◆ ref_begin

◆ ref_end

◆ ref_iter

◆ SIZE

const size_t vec_rtx_properties_base::SIZE = 32
staticprivate

Referenced by vec_rtx_properties_base().

◆ spare

unsigned int rtx_properties::spare
inherited

Referenced by rtx_properties().


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