GCC Middle and Back End API Reference
|
Variables | |
static pretty_printer | buffer |
static int | initialized = 0 |
DEBUG_FUNCTION void debug_generic_expr | ( | ) |
Debugging function to print out a generic expression.
Referenced by build_ssa_operands(), and valid_fixed_convert_types_p().
DEBUG_FUNCTION void debug_generic_stmt | ( | ) |
Debugging function to print out a generic statement.
References pointer_set_create().
Referenced by verify_gimple_assign_ternary(), and verify_types_in_gimple_min_lval().
DEBUG_FUNCTION void debug_tree_chain | ( | ) |
Debugging function to print out a chain of trees .
|
static |
|
static |
Try to print something for an unknown tree code.
|
static |
Dump the domain associated with an array.
|
static |
Dump lexical block BLOCK. BUFFER, SPC and FLAGS are as in dump_generic_node.
References dump_generic_node(), newline_and_indent(), and pp_string().
|
static |
Dump the name of a _DECL node and its DECL_UID if TDF_UID is set in FLAGS.
|
static |
Dump a function declaration. NODE is the FUNCTION_TYPE. BUFFER, SPC and FLAGS are as in dump_generic_node.
Print the argument types.
Drop the trailing void_type_node if we had any previous argument.
Properly dump vararg function types.
Avoid printing any arg for unprototyped functions.
void dump_function_header | ( | ) |
A helper function that is used to dump function information before the function dump.
Referenced by leaf_renumber_regs().
|
static |
Like the above, but used for pretty printing function calls.
int dump_generic_node | ( | pretty_printer * | buffer, |
tree | node, | ||
int | spc, | ||
int | flags, | ||
bool | is_stmt | ||
) |
Dump the node NODE on the pretty_printer BUFFER, SPC spaces of indent. FLAGS specifies details to show in the dump (see TDF_* in dumpfile.h). If IS_STMT is true, the object printed is considered to be a statement and it is terminated by ';' if appropriate.
Dump the types of INTEGER_CSTs explicitly, for we can't infer them and MEM_ATTR caching will share MEM_REFs with differently-typed op0s.
Released SSA_NAMES have no TREE_TYPE.
Same pointer types, but ignoring POINTER_TYPE vs. REFERENCE_TYPE.
Same value types ignoring qualifiers.
Print the innermost component type.
Print the dimensions.
Print the name of the structure.
FIXME: If we eliminate the 'else' above and attempt to show the fields for named types, we may get stuck following a cycle of pointers to structs. The alleged self-reference check in print_struct_decl will not detect cycles involving more than one pointer or struct type.
In the case of a pointer, one may want to divide by the size of the pointed-to type. Unfortunately, this not straightforward. The C front-end maps expressions (int *) 5 int *p; (p + 5) in such a way that the two INTEGER_CST nodes for "5" have different values but identical types. In the latter case, the 5 is multiplied by sizeof (int) in c-common.c (pointer_int_sum) to convert it to a byte address, and yet the type of the node is left unchanged. Argh. What is consistent though is that the number value corresponds to bytes (UNITS) offset. NB: Neither of the following divisors can be trivially used to recover the original literal: TREE_INT_CST_LOW (TYPE_SIZE_UNIT (TREE_TYPE (node))) TYPE_PRECISION (TREE_TYPE (TREE_TYPE (node)))
Code copied from print_node.
Don't print the declaration of built-in types.
The type is a c++ class: all structures have at least 4 methods.
Dump the types of INTEGER_CSTs explicitly, for we can't infer them and MEM_ATTR caching will share MEM_REFs with differently-typed op0s.
Released SSA_NAMES have no TREE_TYPE.
Same pointer types, but ignoring POINTER_TYPE vs. REFERENCE_TYPE.
Same value types ignoring qualifiers.
The lowered cond_exprs should always be printed in full.
Output COND_EXPR_THEN.
Output COND_EXPR_ELSE.
Print parameters.
Binary arithmetic and logic expressions.
When the operands are expressions with less priority, keep semantics of the tree representation.
When the operands are expressions with less priority, keep semantics of the tree representation.
Unary arithmetic and logic expressions.
If this is for break or continue, don't bother printing it.
Referenced by dump_block_node(), dump_gimple_fmt(), dump_gimple_omp_block(), dump_gimple_omp_parallel(), dump_gimple_omp_return(), dump_gimple_omp_teams(), dump_ssaname_info(), print_generic_decl(), and print_generic_stmt().
|
static |
Dump location LOC to BUFFER.
|
static |
Dump OpenMP clause CLAUSE. BUFFER, CLAUSE, SPC and FLAGS are as in dump_generic_node.
Should never happen.
void dump_omp_clauses | ( | ) |
Dump the list of OpenMP clauses. BUFFER, SPC and FLAGS are as in dump_generic_node.
References expand_location(), and pp_string().
Referenced by dump_gimple_debug(), dump_gimple_omp_parallel(), and dump_gimple_omp_teams().
|
static |
Referenced by print_generic_decl(), and print_generic_stmt().
|
static |
References cgraph_get_node(), and lang_hooks::decl_printable_name.
|
static |
|
static |
int op_code_prio | ( | ) |
Return the priority of the operator CODE. From lowest to highest precedence with either left-to-right (L-R) or right-to-left (R-L) associativity]: 1 [L-R] , 2 [R-L] = += -= *= /= %= &= ^= |= <<= >>= 3 [R-L] ?: 4 [L-R] || 5 [L-R] && 6 [L-R] | 7 [L-R] ^ 8 [L-R] & 9 [L-R] == != 10 [L-R] < <= > >= 11 [L-R] << >> 12 [L-R] + - 13 [L-R] * / % 14 [R-L] ! ~ ++ -- + - * & (type) sizeof 15 [L-R] fn() [] -> . unary +, - and * have higher precedence than the corresponding binary operators.
Special expressions.
Return an arbitrarily high precedence to avoid surrounding single VAR_DECLs in ()s.
int op_prio | ( | ) |
Return the priority of the operator OP.
|
static |
@verbatim
Pretty formatting of GENERIC trees in C syntax. Copyright (C) 2001-2013 Free Software Foundation, Inc. Adapted from c-pretty-print.c by Diego Novillo dnovi llo@ redha t.co m
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 version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 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 http://www.gnu.org/licenses/.
Local functions, macros and variables.
|
static |
Return the symbol associated with operator OP.
References pp_string().
const char* op_symbol_code | ( | ) |
Return the symbol associated with operator CODE.
void percent_K_format | ( | ) |
@verbatim
Handle a K format for TEXT. Separate from default_tree_printer so it can also be used in front ends. K: a statement, from which EXPR_LOCATION and TREE_BLOCK will be recorded.
void pp_double_int | ( | ) |
Dump double_int D to pretty_printer PP. UNS is true if D is unsigned and false otherwise.
Would "%x%0*x" or "%x%*0x" get zero-padding on all systems?
void pp_tree_identifier | ( | ) |
Print the identifier ID to PRETTY-PRINTER.
Referenced by asan_clear_shadow(), and print_generic_expr().
|
static |
|
static |
Parses the string STR and replaces new-lines by '\n', tabs by '\t', ...
No need to handle \0; the loop terminates on \0.
void print_call_name | ( | ) |
Prints the name of a call. NODE is the CALL_EXPR_FN of a CALL_EXPR or the gimple_call_fn of a GIMPLE_CALL.
Fallthru.
void print_declaration | ( | ) |
Print the declaration of a variable.
Print the type and name.
Print array's type.
Print variable's name.
Print the dimensions.
Print type declaration.
Print variable's name.
The initial value of a function serves to determine whether the function is declared or defined. So the following does not apply to function nodes.
Print the initial value.
Referenced by dump_gimple_goto().
void print_generic_decl | ( | ) |
Prints declaration DECL to the FILE with details specified by FLAGS.
References dump_generic_node(), maybe_init_pretty_print(), and pp_newline_and_flush().
void print_generic_expr | ( | ) |
Print a single expression T on file FILE. FLAGS specifies details to show in the dump. See TDF_* in dumpfile.h.
References pp_tree_identifier().
Referenced by add_access_to_work_queue(), aff_combination_constant_multiple_p(), dom_opt_dom_walker::after_dom_children(), analyze_caller_dereference_legality(), analyze_evolution_in_loop(), break_up_subtract_bb(), build_and_add_sum(), build_new_reduction(), calculate_live_on_exit(), cgraph_materialize_clone(), check_array_ref(), compute_builtin_object_size(), compute_scalar_evolution_in_loop(), cond_expr_object_size(), count_formal_params(), create_canonical_iv(), debug_tree(), DFS(), dump_asserts_for(), dump_generic_expr(), dump_gimple_stmt_loc(), dump_live_info(), dump_var_map(), eliminate_avail(), eliminate_redundant_computations(), eliminate_useless_phis(), find_interesting_uses_stmt(), find_replaceable_exprs(), gcd_of_steps_may_divide_p(), get_rank(), get_unary_op(), ifcombine_ifandif(), index_in_adjustments_multiple_times_p(), insert_updated_phi_nodes_for(), instantiate_scev_1(), ipa_get_parm_lattices(), ipa_initialize_node_params(), lookup_avail_expr(), n_iv_cands(), n_iv_uses(), non_rewritable_mem_ref_base(), partition_stack_vars(), prepare_block_for_update(), print_expr_hash_elt(), read_replacements_section(), simplify_binary_expression(), test_for_singularity(), tm_log_emit_stmt(), value_replacement(), verify_expr_location_1(), and visit_copy().
void print_generic_stmt | ( | ) |
Print tree T, and its successors, on file FILE. FLAGS specifies details to show in the dump. See TDF_* in dumpfile.h.
References dump_generic_node(), indent, and maybe_init_pretty_print().
Referenced by get_unary_op().
void print_generic_stmt_indented | ( | ) |
Print tree T, and its successors, on file FILE. FLAGS specifies details to show in the dump. See TDF_* in dumpfile.h. The output is indented by INDENT spaces.
|
static |
|
static |
Prints a structure: name, fields, and methods. FIXME: Still incomplete.
Print the name of the structure.
Print the contents of the structure.
Print the fields of the structure.
Avoid to print recursively the structure.
FIXME : Not implemented correctly..., what about the case when we have a cycle in the contain graph? ... Maybe this could be solved by looking at the scope in which the structure was declared.
|
static |
|
static |