GCC Middle and Back End API Reference
|
Functions | |
rtvec | rtvec_alloc () |
rtvec | shallow_copy_rtvec () |
unsigned int | rtx_size () |
rtx | rtx_alloc_stat () |
bool | shared_const_p () |
rtx | copy_rtx () |
rtx | shallow_copy_rtx_stat () |
int | rtx_equal_p_cb () |
int | rtx_equal_p () |
hashval_t | iterative_hash_rtx () |
void | dump_rtx_statistics () |
void | rtl_check_failed_bounds (const_rtx r, int n, const char *file, int line, const char *func) |
void | rtl_check_failed_type1 (const_rtx r, int n, int c1, const char *file, int line, const char *func) |
void | rtl_check_failed_type2 (const_rtx r, int n, int c1, int c2, const char *file, int line, const char *func) |
void | rtl_check_failed_code1 (const_rtx r, enum rtx_code code, const char *file, int line, const char *func) |
void | rtl_check_failed_code2 (const_rtx r, enum rtx_code code1, enum rtx_code code2, const char *file, int line, const char *func) |
void | rtl_check_failed_code_mode (const_rtx r, enum rtx_code code, enum machine_mode mode, bool not_mode, const char *file, int line, const char *func) |
void | rtl_check_failed_block_symbol () |
void | rtvec_check_failed_bounds (const_rtvec r, int n, const char *file, int line, const char *func) |
void | rtl_check_failed_flag (const char *name, const_rtx r, const char *file, int line, const char *func) |
Variables | |
const unsigned char | rtx_length [NUM_RTX_CODE] |
const char *const | rtx_name [NUM_RTX_CODE] |
const char *const | rtx_format [NUM_RTX_CODE] |
enum rtx_class | rtx_class [NUM_RTX_CODE] |
const unsigned char | rtx_code_size [NUM_RTX_CODE] |
const char *const | note_insn_name [NOTE_INSN_MAX] |
const char *const | reg_note_name [REG_NOTE_MAX] |
static int | rtx_alloc_counts [(int) LAST_AND_UNUSED_RTX_CODE] |
static int | rtx_alloc_sizes [(int) LAST_AND_UNUSED_RTX_CODE] |
static int | rtvec_alloc_counts |
static int | rtvec_alloc_sizes |
int | generating_concat_p |
int | currently_expanding_to_rtl |
rtx copy_rtx | ( | ) |
Create a new copy of an rtx. Recursively copies the operands of the rtx, except for those few rtx codes that are sharable.
SCRATCH must be shared because they represent distinct values.
Share clobbers of hard registers (like cc0), but do not share pseudo reg clobbers or clobbers of hard registers that originated as pseudos. This is needed to allow safe register renaming.
A MEM with a constant address is not sharable. The problem is that the constant address may need to be reloaded. If the mem is shared, then reloading one copy of this mem will cause all copies to appear to have been reloaded.
Copy the various flags, fields, and other information. We assume that all fields need copying, and then clear the fields that should not be copied. That is the sensible default behavior, and forces us to explicitly document why we are *not* copying a flag.
We do not copy the USED flag, which is used as a mark bit during walks over the RTL.
These are left unchanged.
Referenced by all_zeros_p(), assign_stack_slot_num_and_sort_pseudos(), cond_exec_find_if_block(), count_occurrences_equiv(), expand_float(), find_comparison_args(), find_reloads_toplev(), find_shift_sequence(), insert_restore(), replace_reg_with_saved_mem(), resolve_subreg_use(), save_call_clobbered_regs(), set_initial_elim_offsets(), set_label_offsets(), split_edge_and_insert(), try_back_substitute_reg(), try_fwprop_subst(), and undo_transformations().
void dump_rtx_statistics | ( | void | ) |
References gdbhooks::GET_RTX_FORMAT(), gdbhooks::GET_RTX_NAME(), internal_error(), and trim_filename().
hashval_t iterative_hash_rtx | ( | ) |
Iteratively hash rtx X.
Referenced by output_index_string_offset().
void rtl_check_failed_block_symbol | ( | ) |
Report that line LINE of FILE tried to access the block symbol fields of a non-block symbol. FUNC is the function that contains the line.
void rtl_check_failed_bounds | ( | const_rtx | r, |
int | n, | ||
const char * | file, | ||
int | line, | ||
const char * | func | ||
) |
References gdbhooks::GET_RTX_NAME(), and internal_error().
void rtl_check_failed_code1 | ( | const_rtx | r, |
enum rtx_code | code, | ||
const char * | file, | ||
int | line, | ||
const char * | func | ||
) |
void rtl_check_failed_code2 | ( | const_rtx | r, |
enum rtx_code | code1, | ||
enum rtx_code | code2, | ||
const char * | file, | ||
int | line, | ||
const char * | func | ||
) |
References gdbhooks::GET_RTX_NAME(), internal_error(), and trim_filename().
void rtl_check_failed_code_mode | ( | const_rtx | r, |
enum rtx_code | code, | ||
enum machine_mode | mode, | ||
bool | not_mode, | ||
const char * | file, | ||
int | line, | ||
const char * | func | ||
) |
void rtl_check_failed_flag | ( | const char * | name, |
const_rtx | r, | ||
const char * | file, | ||
int | line, | ||
const char * | func | ||
) |
void rtl_check_failed_type1 | ( | const_rtx | r, |
int | n, | ||
int | c1, | ||
const char * | file, | ||
int | line, | ||
const char * | func | ||
) |
void rtl_check_failed_type2 | ( | const_rtx | r, |
int | n, | ||
int | c1, | ||
int | c2, | ||
const char * | file, | ||
int | line, | ||
const char * | func | ||
) |
rtvec rtvec_alloc | ( | ) |
Allocate an rtx vector of N elements. Store the length, and initialize all elements to zero.
Clear out the vector.
References rtvec_alloc_counts, and rtvec_alloc_sizes.
Referenced by attr_copy_rtx(), check_defs(), copy_boolean(), insn_invalid_p(), maybe_emit_atomic_exchange(), and write_header().
void rtvec_check_failed_bounds | ( | const_rtvec | r, |
int | n, | ||
const char * | file, | ||
int | line, | ||
const char * | func | ||
) |
XXX Maybe print the vector?
rtx rtx_alloc_stat | ( | ) |
Allocate an rtx of code CODE. The CODE is stored in the rtx; all the rest is initialized to zero.
We want to clear everything up to the FLD array. Normally, this is one int, but we don't want to assume that and it isn't very portable anyway; this is.
int rtx_equal_p | ( | ) |
Return 1 if X and Y are identical-looking rtx's. This is the Lisp function EQUAL for rtx arguments. Whenever changing this function check if rtx_equal_p_cb above doesn't need changing as well.
Rtx's of different codes cannot be equal.
(MULT:SI x y) and (MULT:HI x y) are NOT equivalent. (REG:SI x) and (REG:HI x) are NOT equivalent.
MEMs referring to different address space are not equivalent.
Some RTL can be compared nonrecursively.
Compare the elements. If any pair of corresponding elements fail to match, return 0 for the whole thing.
Two vectors must have the same length.
And the corresponding elements must match.
These are just backpointers, so they don't matter.
It is believed that rtx's at this level will never contain anything but integers and other rtx's, except for within LABEL_REFs and SYMBOL_REFs.
Referenced by add_AT_string(), add_equal_note(), attr_string(), can_reload_into(), canon_condition(), check_allocation(), check_cond_move_block(), compress_float_constant(), copy_replacements_1(), count_reg_usage(), dataflow_set_init(), dbxout_syms(), do_output_reload(), find_call_stack_args(), find_reg_note(), find_variable_location_part(), get_last_value_validate(), invert_exp_1(), kill_clobbered_value(), make_extraction(), maybe_fix_stack_asms(), maybe_propagate_label_ref(), merge_dir(), move2add_valid_value_p(), noce_try_addcc(), prepare_place_to_insert(), prev_nonnote_insn(), prev_nonnote_nondebug_insn(), referenced_in_one_insn_in_loop_p(), simplify_relational_operation_1(), try_back_substitute_reg(), and try_merge_delay_insns().
int rtx_equal_p_cb | ( | ) |
Same as rtx_equal_p, but call CB on each pair of rtx if CB is not NULL. When the callback returns true, we continue with the new pair. Whenever changing this function check if rtx_equal_p below doesn't need changing as well.
Invoke the callback first.
Rtx's of different codes cannot be equal.
(MULT:SI x y) and (MULT:HI x y) are NOT equivalent. (REG:SI x) and (REG:HI x) are NOT equivalent.
MEMs referring to different address space are not equivalent.
Some RTL can be compared nonrecursively.
Compare the elements. If any pair of corresponding elements fail to match, return 0 for the whole thing.
Two vectors must have the same length.
And the corresponding elements must match.
These are just backpointers, so they don't matter.
It is believed that rtx's at this level will never contain anything but integers and other rtx's, except for within LABEL_REFs and SYMBOL_REFs.
unsigned int rtx_size | ( | ) |
Return the number of bytes occupied by rtx value X.
rtvec shallow_copy_rtvec | ( | ) |
Create a bitwise copy of VEC.
rtx shallow_copy_rtx_stat | ( | ) |
Create a new copy of an rtx. Only copy just one level.
bool shared_const_p | ( | ) |
Return true if ORIG is a sharable CONST.
CONST can be shared if it contains a SYMBOL_REF. If it contains a LABEL_REF, it isn't sharable.
References copy().
int currently_expanding_to_rtl |
Nonzero when we are expanding trees to RTL.
int generating_concat_p |
Nonzero when we are generating CONCATs.
Referenced by push_function_context(), and tree_conflicts_with_clobbers_p().
const char* const note_insn_name[NOTE_INSN_MAX] |
Names for kinds of NOTEs and REG_NOTEs.
const char* const reg_note_name[REG_NOTE_MAX] |
Names for REG_NOTE's in EXPR_LIST insn's.
|
static |
Referenced by rtvec_alloc().
|
static |
Referenced by rtvec_alloc().
|
static |
|
static |
Indexed by rtx code, gives a character representing the "class" of that rtx code. See rtl.def for documentation on the defined classes.
const unsigned char rtx_code_size[NUM_RTX_CODE] |
Indexed by rtx code, gives the size of the rtx in bytes.
const char* const rtx_format[NUM_RTX_CODE] |
Indexed by rtx code, gives a sequence of operand-types for rtx's of that code. The sequence is a C string in which each character describes one operand.
const unsigned char rtx_length[NUM_RTX_CODE] |
const char* const rtx_name[NUM_RTX_CODE] |
Referenced by change_cfi_row(), and connect_traces().