GCC Middle and Back End API Reference
tree-dump.cc File Reference
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tree.h"
#include "tree-pretty-print.h"
#include "tree-dump.h"
#include "langhooks.h"
#include "tree-iterator.h"
Include dependency graph for tree-dump.cc:


#define SOL_COLUMN   25 /* Start of line column. @endverbatim */
#define EOL_COLUMN   55 /* End of line column. @endverbatim */
#define COLUMN_ALIGNMENT   15 /* Alignment. @endverbatim */


static unsigned int queue (dump_info_p, const_tree, int)
static void dump_index (dump_info_p, unsigned int)
static void dequeue_and_dump (dump_info_p)
static void dump_new_line (dump_info_p)
static void dump_maybe_newline (dump_info_p)
void queue_and_dump_index (dump_info_p di, const char *field, const_tree t, int flags)
void queue_and_dump_type (dump_info_p di, const_tree t)
void dump_pointer (dump_info_p di, const char *field, void *ptr)
void dump_int (dump_info_p di, const char *field, int i)
static void dump_real (dump_info_p di, const char *field, const REAL_VALUE_TYPE *r)
static void dump_fixed (dump_info_p di, const char *field, const FIXED_VALUE_TYPE *f)
void dump_string (dump_info_p di, const char *string)
void dump_string_field (dump_info_p di, const char *field, const char *string)
int dump_flag (dump_info_p di, dump_flags_t flag, const_tree node)
void dump_node (const_tree t, dump_flags_t flags, FILE *stream)

Macro Definition Documentation


#define COLUMN_ALIGNMENT   15 /* Alignment. @endverbatim */

Referenced by dump_maybe_newline().


#define EOL_COLUMN   55 /* End of line column. @endverbatim */

Referenced by dump_maybe_newline().


#define SOL_COLUMN   25 /* Start of line column. @endverbatim */
Dump column control  

Referenced by dump_maybe_newline(), and dump_new_line().

Function Documentation

◆ dequeue_and_dump()

static void dequeue_and_dump ( dump_info_p di)
Dump the next node in the queue.   

References access_private_node, access_protected_node, access_public_node, BINFO_BASE_ACCESSES, BINFO_BASE_ITERATE, BINFO_N_BASE_BINFOS, BINFO_TYPE, BINFO_VIRTUAL_P, bit_position(), CALL_EXPR_FN, CASE_HIGH, CASE_LABEL, CASE_LOW, CODE_CONTAINS_STRUCT, dump_info::column, CONSTRUCTOR_ELTS, CONSTRUCTOR_NELTS, DEBUG_TEMP_UID, DECL_ABSTRACT_ORIGIN, DECL_ALIGN, DECL_ARG_TYPE, DECL_ARGUMENTS, DECL_ARTIFICIAL, DECL_ASSEMBLER_NAME, DECL_ASSEMBLER_NAME_SET_P, DECL_CHAIN, DECL_CONTEXT, DECL_EXTERNAL, DECL_FIELD_OFFSET, DECL_INITIAL, DECL_NAME, DECL_P, DECL_REGISTER, DECL_SAVED_TREE, DECL_SIZE, DECL_SOURCE_LOCATION, DUMP_BINFO, dump_child, dump_fixed(), dump_index(), dump_int(), dump_maybe_newline(), dump_pointer(), dump_real(), dump_string_field(), lang_hooks_for_tree_dump::dump_tree, expand_location(), FOR_EACH_CALL_EXPR_ARG, FOR_EACH_CONSTRUCTOR_ELT, dump_info::free_list, gcc_unreachable, get_tree_code_name(), ggc_alloc(), HAS_DECL_ASSEMBLER_NAME_P, i, IDENTIFIER_LENGTH, IDENTIFIER_POINTER, IS_EXPR_CODE_CLASS, NULL, OMP_CLAUSE_CODE, omp_clause_code_name, omp_clause_num_ops, OMP_CLAUSE_OPERAND, print_decs(), dump_info::queue, queue_and_dump_index(), queue_and_dump_type(), dump_info::queue_end, dump_info::stream, tcc_binary, tcc_comparison, tcc_constant, tcc_expression, tcc_reference, tcc_statement, tcc_type, tcc_unary, tcc_vl_exp, TDF_ADDRESS, TDF_SLIM, wi::to_wide(), TREE_CHAIN, TREE_CODE, TREE_CODE_CLASS, lang_hooks::tree_dump, TREE_FIXED_CST_PTR, TREE_OPERAND, TREE_PUBLIC, TREE_PURPOSE, TREE_REAL_CST_PTR, TREE_STRING_LENGTH, TREE_STRING_POINTER, TREE_TYPE, TREE_USED, TREE_VALUE, TREE_VEC_ELT, TREE_VEC_LENGTH, tsi_end_p(), tsi_next(), tsi_start(), tsi_stmt(), TYPE_ALIGN, TYPE_ARG_TYPES, TYPE_BINFO, TYPE_DOMAIN, TYPE_FIELDS, TYPE_MAIN_VARIANT, TYPE_MAX_VALUE, TYPE_METHOD_BASETYPE, TYPE_MIN_VALUE, TYPE_NAME, TYPE_PRECISION, TYPE_QUAL_CONST, TYPE_QUAL_RESTRICT, TYPE_QUAL_VOLATILE, lang_hooks_for_tree_dump::type_quals, TYPE_SATURATING, TYPE_SIZE, TYPE_UNQUALIFIED, TYPE_UNSIGNED, TYPE_VALUES, and VAR_P.

Referenced by dump_node().

◆ dump_fixed()

static void dump_fixed ( dump_info_p di,
const char * field,
const FIXED_VALUE_TYPE * f )
Dump the fixed-point value F, using FIELD to identify it.   

References dump_info::column, dump_maybe_newline(), fixed_to_decimal(), ggc_alloc(), and dump_info::stream.

Referenced by dequeue_and_dump().

◆ dump_flag()

int dump_flag ( dump_info_p di,
dump_flags_t flag,
const_tree node )
Return nonzero if FLAG has been specified for the dump, and NODE
is not the root node of the dump.   

References dump_info::flags, and dump_info::node.

◆ dump_index()

static void dump_index ( dump_info_p di,
unsigned int index )

◆ dump_int()

void dump_int ( dump_info_p di,
const char * field,
int i )
Dump integer I using FIELD to identify it.   

References dump_info::column, dump_maybe_newline(), ggc_alloc(), i, and dump_info::stream.

Referenced by dequeue_and_dump().

◆ dump_maybe_newline()

◆ dump_new_line()

static void dump_new_line ( dump_info_p di)
Insert a new line in the dump output, and indent to an appropriate
place to start printing more fields.   

References dump_info::column, ggc_alloc(), SOL_COLUMN, and dump_info::stream.

Referenced by dump_maybe_newline().

◆ dump_node()

◆ dump_pointer()

void dump_pointer ( dump_info_p di,
const char * field,
void * ptr )
Dump pointer PTR using FIELD to identify it.   

References dump_info::column, dump_maybe_newline(), ggc_alloc(), HOST_WIDE_INT_PRINT, and dump_info::stream.

Referenced by dequeue_and_dump().

◆ dump_real()

static void dump_real ( dump_info_p di,
const char * field,
const REAL_VALUE_TYPE * r )
Dump the floating point value R, using FIELD to identify it.   

References dump_info::column, dump_maybe_newline(), ggc_alloc(), r, real_to_decimal(), and dump_info::stream.

Referenced by dequeue_and_dump().

◆ dump_string()

void dump_string ( dump_info_p di,
const char * string )

◆ dump_string_field()

void dump_string_field ( dump_info_p di,
const char * field,
const char * string )
Dump the string field S.   

References dump_info::column, dump_maybe_newline(), ggc_alloc(), and dump_info::stream.

Referenced by dequeue_and_dump().

◆ queue()

static unsigned int queue ( dump_info_p di,
const_tree t,
int flags )
Tree-dumping functionality for intermediate representation.
   Copyright (C) 1999-2024 Free Software Foundation, Inc.
   Written by Mark Mitchell <mark@codesourcery.com>

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later

GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
for more details.

You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3.  If not see
Add T to the end of the queue of nodes to dump.  Returns the index
assigned to T.   

References DUMP_BINFO, dump_info::free_list, ggc_alloc(), dump_info::index, dump_queue::next, dump_info::nodes, dump_info::queue, and dump_info::queue_end.

◆ queue_and_dump_index()

void queue_and_dump_index ( dump_info_p di,
const char * field,
const_tree t,
int flags )
If T has not already been output, queue it for subsequent output.
FIELD is a string to print before printing the index.  Then, the
index of T is printed.   

References dump_info::column, dump_index(), dump_maybe_newline(), ggc_alloc(), dump_info::nodes, queue, dump_info::stream, and splay_tree_node< T >::value().

Referenced by dequeue_and_dump(), and queue_and_dump_type().

◆ queue_and_dump_type()

void queue_and_dump_type ( dump_info_p di,
const_tree t )
Dump the type of T.   

References DUMP_NONE, queue_and_dump_index(), and TREE_TYPE.

Referenced by dequeue_and_dump().