GCC Middle and Back End API Reference
print-rtl.h File Reference
#include "bitmap.h"
Include dependency graph for print-rtl.h:
This graph shows which files directly or indirectly include this file:

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 charstr_pattern_slim (const_rtx)
 
void print_rtx_function (FILE *file, function *fn, bool compact)
 

Function Documentation

◆ dump_insn_slim()

◆ dump_rtl_slim()

void dump_rtl_slim ( FILE * f,
const rtx_insn * first,
const rtx_insn * last,
int count,
int flags )
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, ggc_alloc(), last, NEXT_INSN(), NULL, pp_flush(), and print_insn_with_notes().

Referenced by debug_rtl_slim(), inherit_reload_reg(), lra_dump_insns(), lra_process_new_insns(), and split_reg().

◆ dump_value_slim()

void dump_value_slim ( FILE * f,
const_rtx x,
int verbose )
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 ggc_alloc(), pp_flush(), print_value(), and verbose.

Referenced by curr_insn_transform(), equiv_address_substitution(), get_reload_reg(), ira_update_equiv_info_by_shuffle_insn(), and process_addr_reg().

◆ print_insn()

void print_insn ( pretty_printer * pp,
const rtx_insn * x,
int verbose )
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, ggc_alloc(), 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().

◆ print_insn_with_notes()

void print_insn_with_notes ( pretty_printer * pp,
const rtx_insn * x )
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, ggc_alloc(), 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().

◆ print_pattern()

◆ print_rtx_function()

void print_rtx_function ( FILE * outfile,
function * fn,
bool compact )
extern
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(), ggc_alloc(), NEXT_INSN(), NULL, print_param(), and r.

◆ print_rtx_insn_vec()

void print_rtx_insn_vec ( FILE * file,
const vec< rtx_insn * > & vec )
extern
Print the elements of VEC to FILE.   

References fputc(), ggc_alloc(), i, and print_rtl_single().

Referenced by print_ldst_list(), and print_store_motion_mems().

◆ print_value()

◆ rtl_dump_bb_for_graph()

void rtl_dump_bb_for_graph ( pretty_printer * pp,
basic_block bb )
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().

◆ str_pattern_slim()

const char * str_pattern_slim ( const_rtx x)
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_alloc(), ggc_strdup, pp_formatted_text(), and print_pattern().