GCC Middle and Back End API Reference
|
#include "bitmap.h"
Go to the source code of this file.
Data Structures | |
class | rtx_writer |
class | rtx_reuse_manager |
Functions | |
void | print_rtx_insn_vec (FILE *file, const vec< rtx_insn * > &vec) |
void | dump_value_slim (FILE *, const_rtx, int) |
void | dump_insn_slim (FILE *, const rtx_insn *) |
void | dump_rtl_slim (FILE *, const rtx_insn *, const rtx_insn *, int, int) |
void | print_value (pretty_printer *, const_rtx, int) |
void | print_pattern (pretty_printer *, const_rtx, int) |
void | print_insn (pretty_printer *pp, const rtx_insn *x, int verbose) |
void | print_insn_with_notes (pretty_printer *, const rtx_insn *) |
void | rtl_dump_bb_for_graph (pretty_printer *, basic_block) |
const char * | str_pattern_slim (const_rtx) |
void | print_rtx_function (FILE *file, function *fn, bool compact) |
|
extern |
Emit a slim dump of X (an insn) to the file F, including any register note attached to the instruction.
References pp_flush(), print_insn_with_notes(), and pretty_printer::set_output_stream().
Referenced by attempt_change(), check_and_process_move(), combine_instructions(), combine_reload_insn(), debug_insn_slim(), dump_inc_insn(), dump_mem_insn(), ext_dce_try_optimize_insn(), final_scan_insn_1(), inherit_reload_reg(), lra_constraints(), lra_process_new_insns(), merge_in_block(), print_rtl_with_bb(), process_invariant_for_inheritance(), record_reg_classes(), remove_inheritance_pseudos(), rtl_dump_bb(), scan_one_insn(), split_reg(), try_combine(), undo_optional_reloads(), update_ebb_live_info(), and vt_initialize().
|
extern |
Same as above, but stop at LAST or when COUNT == 0. If COUNT < 0 it will stop only at LAST or NULL rtx.
References count, last, NEXT_INSN(), NULL, pp_flush(), print_insn_with_notes(), and pretty_printer::set_output_stream().
Referenced by debug_rtl_slim(), inherit_reload_reg(), lra_dump_insns(), lra_process_new_insns(), and split_reg().
|
extern |
Print X, an RTL value node, to file F in slim format. Include additional information if VERBOSE is nonzero. Value nodes are constants, registers, labels, symbols and memory.
References pp_flush(), print_value(), pretty_printer::set_output_stream(), and verbose.
Referenced by curr_insn_transform(), equiv_address_substitution(), get_reload_reg(), ira_update_equiv_info_by_shuffle_insn(), and process_addr_reg().
|
extern |
This is the main function in slim rtl visualization mechanism. X is an insn, to be printed into PP. This function tries to print it properly in human-readable form, resembling assembler mnemonics (instead of the older Lisp-style form). If VERBOSE is TRUE, insns are printed with more complete (but longer) pattern names and with extra information, and prefixed with their INSN_UIDs.
References BLOCK_NUMBER, DEBUG_MARKER_INSN_P, DEBUG_TEMP_UID, DECL_NAME, DECL_P, DECL_UID, gcc_unreachable, GET_CODE, GET_NOTE_INSN_NAME, IDENTIFIER_POINTER, INSN_DEBUG_MARKER_KIND, INSN_UID(), INSN_VAR_LOCATION_DECL, INSN_VAR_LOCATION_LOC, NOTE_BASIC_BLOCK, NOTE_BLOCK, NOTE_DELETED_LABEL_NAME, NOTE_EH_HANDLER, NOTE_KIND, NOTE_VAR_LOCATION, NULL, PATTERN(), pp_left_brace, pp_printf(), pp_right_brace, pp_string(), print_pattern(), TREE_CODE, VAR_LOC_UNKNOWN_P, verbose, and XVECEXP.
Referenced by print_insn_with_notes().
|
extern |
Pretty-print a slim dump of X (an insn) to PP, including any register note attached to the instruction.
References GET_CODE, GET_REG_NOTE_NAME, INSN_P, pp_newline(), pp_printf(), pp_string(), print_insn(), print_pattern(), print_rtx_head, REG_NOTE_KIND, REG_NOTES, XEXP, and XINT.
Referenced by dump_insn_slim(), dump_rtl_slim(), print_pattern(), and rtl_dump_bb_for_graph().
|
extern |
The next step in insn detalization, its pattern recognition.
References as_a(), COND_EXEC_CODE, COND_EXEC_TEST, const0_rtx, rtx_sequence::element(), gcc_assert, GET_CODE, GET_RTX_NAME, i, rtx_sequence::insn(), INSN_P, rtx_sequence::len(), PAT_VAR_LOCATION_LOC, pp_equal, pp_exclamation, pp_left_brace, pp_left_paren, pp_newline(), pp_printf(), pp_right_brace, pp_semicolon, pp_string(), print_exp(), print_insn_with_notes(), print_pattern(), print_rtx_head, print_value(), SET, SET_DEST, SET_SRC, TRAP_CONDITION, verbose, XEXP, XSTR, XVECEXP, and XVECLEN.
Referenced by print_exp(), print_insn(), print_insn_with_notes(), print_pattern(), and str_pattern_slim().
Write FN to OUTFILE in a form suitable for parsing, with indentation and comments to make the structure easy for a human to grok. Track the basic blocks of insns in the chain, wrapping those that are within blocks within "(block)" directives. If COMPACT, then instructions are printed in a compact form: - INSN_UIDs are omitted, except for jumps and CODE_LABELs, - INSN_CODEs are omitted, - register numbers are omitted for hard and virtual regs, and non-virtual pseudos are offset relative to the first such reg, and printed with a '%' sigil e.g. "%0" for (LAST_VIRTUAL_REGISTER + 1), - insn names are prefixed with "c" (e.g. "cinsn", "cnote", etc) Example output (with COMPACT==true): (function "times_two" (param "i" (DECL_RTL (mem/c:SI (plus:DI (reg/f:DI virtual-stack-vars) (const_int -4)) [1 i+0 S4 A32])) (DECL_RTL_INCOMING (reg:SI di [ i ]))) (insn-chain (cnote 1 NOTE_INSN_DELETED) (block 2 (edge-from entry (flags "FALLTHRU")) (cnote 4 [bb 2] NOTE_INSN_BASIC_BLOCK) (cinsn 2 (set (mem/c:SI (plus:DI (reg/f:DI virtual-stack-vars) (const_int -4)) [1 i+0 S4 A32]) (reg:SI di [ i ])) "t.c":2) (cnote 3 NOTE_INSN_FUNCTION_BEG) (cinsn 6 (set (reg:SI <2>) (mem/c:SI (plus:DI (reg/f:DI virtual-stack-vars) (const_int -4)) [1 i+0 S4 A32])) "t.c":3) (cinsn 7 (parallel [ (set (reg:SI <0> [ _2 ]) (ashift:SI (reg:SI <2>) (const_int 1))) (clobber (reg:CC flags)) ]) "t.c":3 (expr_list:REG_EQUAL (ashift:SI (mem/c:SI (plus:DI (reg/f:DI virtual-stack-vars) (const_int -4)) [1 i+0 S4 A32]) (const_int 1)))) (cinsn 10 (set (reg:SI <1> [ <retval> ]) (reg:SI <0> [ _2 ])) "t.c":3) (cinsn 14 (set (reg/i:SI ax) (reg:SI <1> [ <retval> ])) "t.c":4) (cinsn 15 (use (reg/i:SI ax)) "t.c":4) (edge-to exit (flags "FALLTHRU")) ) ;; block 2 ) ;; insn-chain (crtl (return_rtx (reg/i:SI ax) ) ;; return_rtx ) ;; crtl ) ;; function "times_two"
References begin_any_block(), BLOCK_FOR_INSN(), can_have_basic_block_p(), crtl, curr_bb, function::decl, DECL_ARGUMENTS, DECL_CHAIN, lang_hooks::decl_printable_name, end_any_block(), get_insns(), NEXT_INSN(), NULL, print_param(), rtx_writer::print_rtl_single_with_indent(), and r.
Print the elements of VEC to FILE.
References fputc(), i, and print_rtl_single().
Referenced by print_ldst_list(), and print_store_motion_mems().
|
extern |
Prints rtxes, I customarily classified as values. They're constants, registers, labels, symbols and memory accesses.
References CONST_DOUBLE_HIGH, CONST_DOUBLE_LOW, CONST_DOUBLE_REAL_VALUE, CONST_FIXED_VALUE, CONST_POLY_INT_COEFFS, CONST_WIDE_INT_ELT, CONST_WIDE_INT_NUNITS, DEBUG_EXPR_TREE_DECL, DEBUG_TEMP_UID, fixed_to_decimal(), FLOAT_MODE_P, GET_CODE, GET_MODE, GET_MODE_NAME, GET_RTX_NAME, HOST_WIDE_INT_PRINT_HEX, i, INSN_UID(), INTVAL, label_ref_label(), NUM_POLY_INT_COEFFS, pp_greater, pp_left_bracket, pp_modulo, pp_printf(), pp_right_bracket, pp_right_paren, pp_scalar, pp_string(), pp_wide_int(), pp_wide_integer(), pretty_print_string(), print_exp(), print_value(), real_to_decimal(), reg_names, REGNO, SIGNED, SUBREG_BYTE, SUBREG_REG, verbose, XEXP, and XSTR.
Referenced by dump_value_slim(), print_exp(), print_pattern(), and print_value().
|
extern |
Dumps basic block BB to pretty-printer PP in slim form and without and no indentation, for use as a label of a DOT graph record-node.
References FOR_BB_INSNS, pp_bar, pp_write_text_as_dot_label_to_stream(), pp_write_text_to_stream(), and print_insn_with_notes().
|
extern |
Pretty-print pattern X of some insn in non-verbose mode. Return a string pointer to the pretty-printer buffer. This function is only exported exists only to accommodate some older users of the slim RTL pretty printers. Please do not use it for new code.
References ggc_strdup, pp_formatted_text(), and print_pattern().