GCC Middle and Back End API Reference
|
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "backend.h"
#include "rtl.h"
#include "tree.h"
#include "predict.h"
#include "cgraph.h"
#include "tree-pretty-print.h"
#include "stor-layout.h"
#include "langhooks.h"
#include "tree-iterator.h"
#include "dumpfile.h"
#include "internal-fn.h"
#include "gomp-constants.h"
#include "gimple.h"
#include "fold-const.h"
#include "omp-general.h"
Macros | |
#define | INDENT(SPACE) |
#define | NIY do_niy (pp, node, spc, flags) |
Variables | |
static pretty_printer * | tree_pp |
#define INDENT | ( | SPACE | ) |
Referenced by newline_and_indent(), print_declaration(), and print_struct_decl().
#define NIY do_niy (pp, node, spc, flags) |
Referenced by dump_generic_node(), and print_call_name().
DEBUG_FUNCTION void debug_generic_expr | ( | tree | t | ) |
Debugging function to print out a generic expression.
References print_generic_expr(), TDF_MEMSYMS, and TDF_VOPS.
Referenced by debug_mapping_group(), verify_gimple_assign_binary(), verify_gimple_assign_single(), verify_gimple_assign_ternary(), verify_gimple_assign_unary(), verify_gimple_call(), verify_gimple_comparison(), verify_gimple_in_cfg(), verify_gimple_phi(), verify_gimple_switch(), and operands_scanner::verify_ssa_operands().
DEBUG_FUNCTION void debug_generic_stmt | ( | tree | t | ) |
Debugging function to print out a generic statement.
References print_generic_stmt(), TDF_MEMSYMS, and TDF_VOPS.
Referenced by debug_dv(), new_die(), verify_gimple_assign(), verify_gimple_assign_binary(), verify_gimple_assign_single(), verify_gimple_call(), verify_gimple_phi(), verify_gimple_return(), verify_gimple_switch(), and verify_types_in_gimple_reference().
DEBUG_FUNCTION void debug_tree_chain | ( | tree | t | ) |
Debugging function to print out a chain of trees .
References hash_set< KeyId, Lazy, Traits >::add(), print_generic_expr(), TDF_MEMSYMS, TDF_UID, TDF_VOPS, and TREE_CHAIN.
|
static |
Try to print something for an unknown tree code.
References dump_generic_node(), EXPR_P, get_tree_code_name(), i, newline_and_indent(), pp_string(), TREE_CODE, TREE_OPERAND, and TREE_OPERAND_LENGTH.
|
static |
Dump the domain associated with an array.
References dump_generic_node(), integer_zerop(), pp_colon, pp_left_bracket, pp_right_bracket, pp_string(), pp_wide_integer(), tree_fits_shwi_p(), tree_to_shwi(), TYPE_MAX_VALUE, and TYPE_MIN_VALUE.
Referenced by dump_generic_node(), and print_declaration().
|
static |
Dump lexical block BLOCK. PP, SPC and FLAGS are as in dump_generic_node.
References BLOCK_ABSTRACT_ORIGIN, BLOCK_CHAIN, BLOCK_FRAGMENT_CHAIN, BLOCK_FRAGMENT_ORIGIN, BLOCK_NONLOCALIZED_VARS, BLOCK_NUMBER, BLOCK_SOURCE_LOCATION, BLOCK_SUBBLOCKS, BLOCK_SUPERCONTEXT, BLOCK_VARS, dump_generic_node(), dump_location(), FOR_EACH_VEC_ELT, i, newline_and_indent(), pp_character(), pp_decimal_int, pp_scalar, pp_space, pp_string(), TDF_ADDRESS, TDF_SLIM, TREE_ASM_WRITTEN, TREE_CHAIN, and vec_safe_length().
Referenced by dump_generic_node().
|
static |
Dump the name of a _DECL node and its DECL_UID if TDF_UID is set in FLAGS.
References DEBUG_TEMP_UID, DECL_ASSEMBLER_NAME_RAW, DECL_ASSEMBLER_NAME_SET_P, DECL_IGNORED_P, DECL_NAME, DECL_NAMELESS, DECL_PT_UID, DECL_UID, dump_fancy_name(), HAS_DECL_ASSEMBLER_NAME_P, LABEL_DECL_UID, NULL_TREE, pp_character(), pp_decimal_int, pp_scalar, pp_string(), pp_tree_identifier(), TDF_ALIAS, TDF_ASMNAME, TDF_COMPARE_DEBUG, TDF_GIMPLE, TDF_NOUID, TDF_UID, and TREE_CODE.
Referenced by dump_function_name(), dump_generic_node(), and print_declaration().
|
static |
Dump NAME, an IDENTIFIER_POINTER, sanitized so that D<num> sequences in it are replaced with Dxxxx, as long as they are at the start or preceded by $ and at the end or followed by $. See make_fancy_name in tree-sra.cc.
References IDENTIFIER_LENGTH, IDENTIFIER_POINTER, identifier_to_locale(), NULL, pp_append_text(), pp_translate_identifiers(), and pp_tree_identifier().
Referenced by dump_decl_name(), and dump_generic_node().
|
static |
Dump a function declaration. NODE is the FUNCTION_TYPE. PP, SPC and FLAGS are as in dump_generic_node.
References dump_generic_node(), error_mark_node, pp_comma, pp_left_paren, pp_right_paren, pp_space, pp_string(), TREE_CHAIN, TREE_VALUE, TYPE_ARG_TYPES, and void_list_node.
Referenced by dump_generic_node(), and print_declaration().
void dump_function_header | ( | FILE * | dump_file, |
tree | fdecl, | ||
dump_flags_t | flags ) |
A helper function that is used to dump function information before the function dump.
References DECL_ASSEMBLER_NAME, DECL_ASSEMBLER_NAME_SET_P, lang_hooks::decl_printable_name, DECL_STRUCT_FUNCTION, DECL_UID, dump_file, cgraph_node::frequency, function::funcdef_no, cgraph_node::get(), cgraph_node::get_uid(), IDENTIFIER_POINTER, NODE_FREQUENCY_EXECUTED_ONCE, NODE_FREQUENCY_HOT, NODE_FREQUENCY_UNLIKELY_EXECUTED, symtab_node::order, and TDF_NOUID.
Referenced by expand_omp(), expand_omp_target(), expand_omp_taskreg(), gimple_dump_cfg(), pass_init_dump_file(), rest_of_clean_state(), and tree_profiling().
|
static |
Like the above, but used for pretty printing function calls.
References CONVERT_EXPR_P, DECL_NAME, lang_hooks::decl_printable_name, DECL_UID, dump_decl_name(), pp_character(), pp_scalar, pp_string(), TDF_ASMNAME, TDF_GIMPLE, TDF_UID, and TREE_OPERAND.
Referenced by print_call_name().
int dump_generic_node | ( | pretty_printer * | pp, |
tree | node, | ||
int | spc, | ||
dump_flags_t | flags, | ||
bool | is_stmt ) |
Dump the node NODE on the pretty_printer PP, 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.
References ADDR_SPACE_GENERIC_P, annot_expr_ivdep_kind, annot_expr_maybe_infinite_kind, annot_expr_no_vector_kind, annot_expr_parallel_kind, annot_expr_unroll_kind, annot_expr_vector_kind, array_ref_element_size(), array_ref_low_bound(), ASM_CLOBBERS, ASM_INPUTS, ASM_OUTPUTS, ASM_STRING, ASM_VOLATILE_P, BIND_EXPR_BODY, BIND_EXPR_VARS, BINFO_TYPE, CALL_EXPR_FN, CALL_EXPR_IFN, call_expr_nargs, CALL_EXPR_RETURN_SLOT_OPT, CALL_EXPR_STATIC_CHAIN, CALL_EXPR_TAILCALL, CALL_EXPR_VA_ARG_PACK, CASE_CONVERT, CASE_HIGH, CASE_LOW, CATCH_BODY, CATCH_TYPES, CHAR_BIT, CHAR_TYPE_SIZE, CHREC_LEFT, CHREC_NOWRAP, CHREC_RIGHT, CHREC_VARIABLE, CLOBBER_KIND, CLOBBER_OBJECT_BEGIN, CLOBBER_OBJECT_END, CLOBBER_STORAGE_BEGIN, CLOBBER_STORAGE_END, COMPARISON_CLASS_P, component_ref_field_offset(), COND_EXPR_COND, COND_EXPR_ELSE, COND_EXPR_THEN, CONSTRUCTOR_ELTS, CONSTRUCTOR_NELTS, DECL_CHAIN, DECL_EXPR_DECL, DECL_IS_UNDECLARED_BUILTIN, DECL_NAME, DECL_NAMELESS, DECL_NONLOCAL, DECL_P, DECL_UID, dump_array_domain(), dump_block_node(), dump_decl_name(), dump_fancy_name(), dump_function_declaration(), dump_generic_node(), dump_location(), dump_mem_ref(), dump_omp_atomic_memory_order(), dump_omp_clauses(), dump_omp_loop_non_rect_expr(), EH_FILTER_FAILURE, EH_FILTER_TYPES, error_mark_node, exact_log2(), EXPR_HAS_LOCATION, EXPR_LOCATION, EXPR_P, fixed_to_decimal(), FOR_EACH_CALL_EXPR_ARG, FOR_EACH_CONSTRUCTOR_ELT, gcc_assert, gcc_unreachable, get_tree_code_name(), GOTO_DESTINATION, i, IDENTIFIER_POINTER, INT_TYPE_SIZE, integer_type_node, integer_zerop(), INTEGRAL_TYPE_P, internal_fn_name(), IS_EMPTY_STMT, LABEL_DECL_UID, LONG_LONG_TYPE_SIZE, long_long_unsigned_type_node, LONG_TYPE_SIZE, long_unsigned_type_node, LOOP_EXPR_BODY, more_call_expr_args_p(), MR_DEPENDENCE_CLIQUE, wi::neg_p(), newline_and_indent(), NIY, NULL, NULL_TREE, NUM_POLY_INT_COEFFS, OACC_CACHE_CLAUSES, OACC_DATA_CLAUSES, OACC_DECLARE_CLAUSES, OACC_ENTER_DATA_CLAUSES, OACC_EXIT_DATA_CLAUSES, OACC_HOST_DATA_CLAUSES, OACC_UPDATE_CLAUSES, obj_type_ref_class(), OBJ_TYPE_REF_EXPR, OBJ_TYPE_REF_OBJECT, OBJ_TYPE_REF_TOKEN, OMP_ATOMIC_MEMORY_ORDER, OMP_ATOMIC_WEAK, OMP_BODY, OMP_CLAUSES, OMP_CRITICAL_CLAUSES, OMP_CRITICAL_NAME, OMP_DISPATCH_CLAUSES, OMP_FOR_BODY, OMP_FOR_CLAUSES, OMP_FOR_COND, OMP_FOR_INCR, OMP_FOR_INIT, OMP_FOR_PRE_BODY, OMP_INTEROP_CLAUSES, OMP_MASKED_CLAUSES, OMP_ORDERED_CLAUSES, OMP_PARALLEL_CLAUSES, OMP_SCAN_CLAUSES, OMP_SCOPE_CLAUSES, OMP_SECTIONS_CLAUSES, OMP_SINGLE_CLAUSES, OMP_TARGET_CLAUSES, OMP_TARGET_DATA_CLAUSES, OMP_TARGET_ENTER_DATA_CLAUSES, OMP_TARGET_EXIT_DATA_CLAUSES, OMP_TARGET_UPDATE_CLAUSES, OMP_TASK_BODY, OMP_TASK_CLAUSES, OMP_TASKGROUP_CLAUSES, OMP_TEAMS_CLAUSES, op_prio(), op_symbol(), POINTER_TYPE_P, POLY_INT_CST_COEFF, pow2p_hwi(), pp_arrow, pp_buffer(), pp_character(), pp_colon, pp_colon_colon, pp_comma, pp_decimal_int, pp_dot, pp_equal, pp_greater, pp_left_brace, pp_left_bracket, pp_left_paren, pp_minus, pp_newline(), pp_question, pp_right_brace, pp_right_bracket, pp_right_paren, pp_scalar, pp_semicolon, pp_space, pp_string(), pp_tree_identifier(), pp_underscore, pp_unsigned_wide_integer, pp_wide_integer(), PREDICT_EXPR_OUTCOME, PREDICT_EXPR_PREDICTOR, predictor_name(), pretty_print_string(), print_call_name(), print_declaration(), print_hex(), print_hex_buf_size(), print_struct_decl(), RAW_DATA_LENGTH, RAW_DATA_SCHAR_ELT, RAW_DATA_UCHAR_ELT, real_to_decimal(), REAL_VALUE_ISINF, REAL_VALUE_ISNAN, REAL_VALUE_NEGATIVE, REAL_VALUE_TYPE, SHORT_TYPE_SIZE, si, sizetype, SSA_NAME_IDENTIFIER, SSA_NAME_IS_DEFAULT_DEF, SSA_NAME_OCCURS_IN_ABNORMAL_PHI, SSA_NAME_VAR, SSA_NAME_VERSION, SWITCH_BODY, SWITCH_COND, TARGET_EXPR_INITIAL, TARGET_EXPR_SLOT, tcc_declaration, tcc_type, TDF_COMPARE_DEBUG, TDF_GIMPLE, TDF_GIMPLE_VAL, TDF_LINENO, TDF_NOUID, TDF_SLIM, TDF_STMTADDR, wi::to_wide(), wi::to_widest(), TRANSACTION_EXPR_BODY, TRANSACTION_EXPR_OUTER, TRANSACTION_EXPR_RELAXED, TREE_CHAIN, TREE_CLOBBER_P, TREE_CODE, TREE_CODE_CLASS, tree_fits_shwi_p(), tree_fits_uhwi_p(), TREE_FIXED_CST_PTR, TREE_IMAGPART, TREE_INT_CST_LOW, tree_int_cst_sgn(), TREE_OPERAND, TREE_OVERFLOW, TREE_PURPOSE, TREE_REAL_CST, TREE_REALPART, TREE_STRING_LENGTH, TREE_STRING_POINTER, tree_to_poly_uint64(), tree_to_shwi(), tree_to_uhwi(), TREE_TYPE, TREE_VALUE, TREE_VEC_ELT, TREE_VEC_LENGTH, tsi_end_p(), tsi_next(), tsi_start(), tsi_stmt(), type(), TYPE_ADDR_SPACE, TYPE_ALIGN, TYPE_DOMAIN, TYPE_IDENTIFIER, TYPE_MAIN_VARIANT, TYPE_METHOD_BASETYPE, TYPE_MIN_VALUE, TYPE_MODE, TYPE_NAME, TYPE_PRECISION, TYPE_QUAL_ATOMIC, TYPE_QUAL_CONST, TYPE_QUAL_RESTRICT, TYPE_QUAL_VOLATILE, TYPE_QUALS, TYPE_REF_CAN_ALIAS_ALL, TYPE_SATURATING, TYPE_SIGN, TYPE_SIZE, TYPE_SIZE_UNIT, TYPE_UID, TYPE_UNSIGNED, TYPE_VECTOR_SUBPARTS(), UNLIKELY, unsigned_type_node, VECTOR_CST_ELT, vector_cst_encoded_nelts(), VECTOR_CST_NELTS, virtual_method_call_p(), and void_type_node.
Referenced by default_tree_printer(), do_niy(), dump_array_domain(), dump_binary_rhs(), dump_block_node(), dump_function_declaration(), dump_generic_node(), dump_gimple_asm(), dump_gimple_assign(), dump_gimple_assume(), dump_gimple_call(), dump_gimple_call_args(), dump_gimple_cond(), dump_gimple_fmt(), dump_gimple_label(), dump_gimple_mem_ops(), dump_gimple_omp_atomic_load(), dump_gimple_omp_atomic_store(), dump_gimple_omp_continue(), dump_gimple_omp_critical(), dump_gimple_omp_for(), dump_gimple_omp_parallel(), dump_gimple_omp_return(), dump_gimple_omp_sections(), dump_gimple_omp_target(), dump_gimple_omp_task(), dump_gimple_phi(), dump_gimple_return(), dump_gimple_switch(), dump_gimple_transaction(), dump_mem_ref(), dump_omp_clause(), dump_omp_context_selector(), dump_omp_iterators(), dump_omp_loop_non_rect_expr(), dump_ternary_rhs(), dump_unary_rhs(), make_item_for_dump_generic_expr(), print_call_name(), print_declaration(), print_generic_expr(), print_generic_expr_to_str(), print_generic_stmt(), print_generic_stmt_indented(), print_struct_decl(), vrange_printer::visit(), vrange_printer::visit(), and vrange_printer::visit().
void dump_location | ( | pretty_printer * | pp, |
location_t | loc ) |
Dump location LOC to PP.
References expand_location(), get_discriminator_from_loc(), pp_colon, pp_decimal_int, pp_left_bracket, and pp_string().
Referenced by dump_block_node(), dump_generic_node(), dump_gimple_phi(), dump_implicit_edges(), and pp_gimple_stmt_1().
|
static |
Helper to dump a MEM_REF node.
References dump_generic_node(), integer_zerop(), MR_DEPENDENCE_BASE, MR_DEPENDENCE_CLIQUE, NULL_TREE, operand_equal_p(), POINTER_TYPE_P, pp_decimal_int, pp_greater, pp_left_paren, pp_right_bracket, pp_right_paren, pp_star, pp_string(), pp_unsigned_wide_integer, TDF_ALIAS, TDF_GIMPLE, TDF_SLIM, TMR_INDEX, TMR_INDEX2, TMR_STEP, TREE_CODE, TREE_OPERAND, TREE_TYPE, TYPE_ALIGN, TYPE_MAIN_VARIANT, TYPE_MODE, TYPE_REF_CAN_ALIAS_ALL, and TYPE_SIZE.
Referenced by dump_generic_node().
void dump_omp_atomic_memory_order | ( | pretty_printer * | pp, |
enum omp_memory_order | mo ) |
Dump #pragma omp atomic memory order clause.
References gcc_unreachable, OMP_FAIL_MEMORY_ORDER_ACQUIRE, OMP_FAIL_MEMORY_ORDER_MASK, OMP_FAIL_MEMORY_ORDER_RELAXED, OMP_FAIL_MEMORY_ORDER_SEQ_CST, OMP_FAIL_MEMORY_ORDER_UNSPECIFIED, OMP_MEMORY_ORDER_ACQ_REL, OMP_MEMORY_ORDER_ACQUIRE, OMP_MEMORY_ORDER_MASK, OMP_MEMORY_ORDER_RELAXED, OMP_MEMORY_ORDER_RELEASE, OMP_MEMORY_ORDER_SEQ_CST, OMP_MEMORY_ORDER_UNSPECIFIED, and pp_string().
Referenced by dump_generic_node(), dump_gimple_omp_atomic_load(), and dump_gimple_omp_atomic_store().
|
static |
Dump OMP clause CLAUSE, without following OMP_CLAUSE_CHAIN. PP, CLAUSE, SPC and FLAGS are as in dump_generic_node.
References dump_generic_node(), dump_omp_init_prefer_type(), dump_omp_iterators(), gcc_assert, gcc_unreachable, integer_minus_one_node, integer_zero_node, NULL, null_pointer_node, NULL_TREE, OMP_CLAUSE__CACHE_, OMP_CLAUSE__CACHE__READONLY, OMP_CLAUSE__CONDTEMP_, OMP_CLAUSE__LOOPTEMP_, OMP_CLAUSE__REDUCTEMP_, OMP_CLAUSE__SCANTEMP_, OMP_CLAUSE__SIMDUID_, OMP_CLAUSE__SIMDUID__DECL, OMP_CLAUSE__SIMT_, OMP_CLAUSE_AFFINITY, OMP_CLAUSE_ALIGNED, OMP_CLAUSE_ALIGNED_ALIGNMENT, OMP_CLAUSE_ALLOCATE, OMP_CLAUSE_ALLOCATE_ALIGN, OMP_CLAUSE_ALLOCATE_ALLOCATOR, OMP_CLAUSE_ASYNC, OMP_CLAUSE_ASYNC_EXPR, OMP_CLAUSE_AUTO, OMP_CLAUSE_BIND, OMP_CLAUSE_BIND_KIND, OMP_CLAUSE_BIND_PARALLEL, OMP_CLAUSE_BIND_TEAMS, OMP_CLAUSE_BIND_THREAD, OMP_CLAUSE_CODE, omp_clause_code_name, OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_COLLAPSE_EXPR, OMP_CLAUSE_COPYIN, OMP_CLAUSE_COPYPRIVATE, OMP_CLAUSE_DECL, OMP_CLAUSE_DEFAULT, OMP_CLAUSE_DEFAULT_FIRSTPRIVATE, OMP_CLAUSE_DEFAULT_KIND, OMP_CLAUSE_DEFAULT_NONE, OMP_CLAUSE_DEFAULT_PRESENT, OMP_CLAUSE_DEFAULT_PRIVATE, OMP_CLAUSE_DEFAULT_SHARED, OMP_CLAUSE_DEFAULT_UNSPECIFIED, OMP_CLAUSE_DEFAULTMAP, OMP_CLAUSE_DEFAULTMAP_ALLOC, OMP_CLAUSE_DEFAULTMAP_BEHAVIOR, OMP_CLAUSE_DEFAULTMAP_CATEGORY, OMP_CLAUSE_DEFAULTMAP_CATEGORY_AGGREGATE, OMP_CLAUSE_DEFAULTMAP_CATEGORY_ALL, OMP_CLAUSE_DEFAULTMAP_CATEGORY_ALLOCATABLE, OMP_CLAUSE_DEFAULTMAP_CATEGORY_POINTER, OMP_CLAUSE_DEFAULTMAP_CATEGORY_SCALAR, OMP_CLAUSE_DEFAULTMAP_CATEGORY_UNSPECIFIED, OMP_CLAUSE_DEFAULTMAP_DEFAULT, OMP_CLAUSE_DEFAULTMAP_FIRSTPRIVATE, OMP_CLAUSE_DEFAULTMAP_FROM, OMP_CLAUSE_DEFAULTMAP_NONE, OMP_CLAUSE_DEFAULTMAP_PRESENT, OMP_CLAUSE_DEFAULTMAP_TO, OMP_CLAUSE_DEFAULTMAP_TOFROM, OMP_CLAUSE_DEPEND, OMP_CLAUSE_DEPEND_DEPOBJ, OMP_CLAUSE_DEPEND_IN, OMP_CLAUSE_DEPEND_INOUT, OMP_CLAUSE_DEPEND_INOUTSET, OMP_CLAUSE_DEPEND_KIND, OMP_CLAUSE_DEPEND_LAST, OMP_CLAUSE_DEPEND_MUTEXINOUTSET, OMP_CLAUSE_DEPEND_OUT, OMP_CLAUSE_DESTROY, OMP_CLAUSE_DETACH, OMP_CLAUSE_DEVICE, OMP_CLAUSE_DEVICE_ANCESTOR, OMP_CLAUSE_DEVICE_ID, OMP_CLAUSE_DEVICE_TYPE, OMP_CLAUSE_DEVICE_TYPE_ANY, OMP_CLAUSE_DEVICE_TYPE_HOST, OMP_CLAUSE_DEVICE_TYPE_KIND, OMP_CLAUSE_DEVICE_TYPE_NOHOST, OMP_CLAUSE_DIST_SCHEDULE, OMP_CLAUSE_DIST_SCHEDULE_CHUNK_EXPR, OMP_CLAUSE_DOACROSS, OMP_CLAUSE_DOACROSS_DEPEND, OMP_CLAUSE_DOACROSS_KIND, OMP_CLAUSE_DOACROSS_SINK, OMP_CLAUSE_DOACROSS_SINK_NEGATIVE, OMP_CLAUSE_DOACROSS_SOURCE, OMP_CLAUSE_ENTER, OMP_CLAUSE_ENTER_TO, OMP_CLAUSE_EXCLUSIVE, OMP_CLAUSE_FILTER, OMP_CLAUSE_FILTER_EXPR, OMP_CLAUSE_FINAL, OMP_CLAUSE_FINAL_EXPR, OMP_CLAUSE_FINALIZE, OMP_CLAUSE_FIRSTPRIVATE, OMP_CLAUSE_FOR, OMP_CLAUSE_FROM, OMP_CLAUSE_FULL, OMP_CLAUSE_GANG, OMP_CLAUSE_GANG_EXPR, OMP_CLAUSE_GANG_STATIC_EXPR, OMP_CLAUSE_GRAINSIZE, OMP_CLAUSE_GRAINSIZE_EXPR, OMP_CLAUSE_GRAINSIZE_STRICT, OMP_CLAUSE_HAS_DEVICE_ADDR, OMP_CLAUSE_HINT, OMP_CLAUSE_HINT_EXPR, OMP_CLAUSE_IF, OMP_CLAUSE_IF_EXPR, OMP_CLAUSE_IF_MODIFIER, OMP_CLAUSE_IF_PRESENT, OMP_CLAUSE_IN_REDUCTION, OMP_CLAUSE_INBRANCH, OMP_CLAUSE_INCLUSIVE, OMP_CLAUSE_INDEPENDENT, OMP_CLAUSE_INIT, OMP_CLAUSE_INIT_PREFER_TYPE, OMP_CLAUSE_INIT_TARGET, OMP_CLAUSE_INIT_TARGETSYNC, OMP_CLAUSE_INTEROP, OMP_CLAUSE_IS_DEVICE_PTR, OMP_CLAUSE_LASTPRIVATE, OMP_CLAUSE_LASTPRIVATE_CONDITIONAL, OMP_CLAUSE_LINEAR, OMP_CLAUSE_LINEAR_DEFAULT, OMP_CLAUSE_LINEAR_KIND, OMP_CLAUSE_LINEAR_OLD_LINEAR_MODIFIER, OMP_CLAUSE_LINEAR_REF, OMP_CLAUSE_LINEAR_STEP, OMP_CLAUSE_LINEAR_UVAL, OMP_CLAUSE_LINEAR_VAL, OMP_CLAUSE_LINK, OMP_CLAUSE_MAP, OMP_CLAUSE_MAP_KIND, OMP_CLAUSE_MAP_READONLY, OMP_CLAUSE_MAP_RUNTIME_IMPLICIT_P, OMP_CLAUSE_MERGEABLE, OMP_CLAUSE_MOTION_PRESENT, OMP_CLAUSE_NOCONTEXT, OMP_CLAUSE_NOCONTEXT_EXPR, OMP_CLAUSE_NOGROUP, OMP_CLAUSE_NOHOST, OMP_CLAUSE_NONTEMPORAL, OMP_CLAUSE_NOTINBRANCH, OMP_CLAUSE_NOVARIANTS, OMP_CLAUSE_NOVARIANTS_EXPR, OMP_CLAUSE_NOWAIT, OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_GANGS_EXPR, OMP_CLAUSE_NUM_TASKS, OMP_CLAUSE_NUM_TASKS_EXPR, OMP_CLAUSE_NUM_TASKS_STRICT, OMP_CLAUSE_NUM_TEAMS, OMP_CLAUSE_NUM_TEAMS_LOWER_EXPR, OMP_CLAUSE_NUM_TEAMS_UPPER_EXPR, OMP_CLAUSE_NUM_THREADS, OMP_CLAUSE_NUM_THREADS_EXPR, OMP_CLAUSE_NUM_WORKERS, OMP_CLAUSE_NUM_WORKERS_EXPR, OMP_CLAUSE_ORDER, OMP_CLAUSE_ORDER_REPRODUCIBLE, OMP_CLAUSE_ORDER_UNCONSTRAINED, OMP_CLAUSE_ORDERED, OMP_CLAUSE_ORDERED_EXPR, OMP_CLAUSE_PARALLEL, OMP_CLAUSE_PARTIAL, OMP_CLAUSE_PARTIAL_EXPR, OMP_CLAUSE_PRIORITY, OMP_CLAUSE_PRIORITY_EXPR, OMP_CLAUSE_PRIVATE, OMP_CLAUSE_PROC_BIND, OMP_CLAUSE_PROC_BIND_CLOSE, OMP_CLAUSE_PROC_BIND_KIND, OMP_CLAUSE_PROC_BIND_MASTER, OMP_CLAUSE_PROC_BIND_SPREAD, OMP_CLAUSE_REDUCTION, OMP_CLAUSE_REDUCTION_CODE, OMP_CLAUSE_REDUCTION_INSCAN, OMP_CLAUSE_REDUCTION_TASK, OMP_CLAUSE_RELEASE_DESCRIPTOR, OMP_CLAUSE_SAFELEN, OMP_CLAUSE_SAFELEN_EXPR, OMP_CLAUSE_SCHEDULE, OMP_CLAUSE_SCHEDULE_AUTO, OMP_CLAUSE_SCHEDULE_CHUNK_EXPR, OMP_CLAUSE_SCHEDULE_DYNAMIC, OMP_CLAUSE_SCHEDULE_GUIDED, OMP_CLAUSE_SCHEDULE_KIND, OMP_CLAUSE_SCHEDULE_MASK, OMP_CLAUSE_SCHEDULE_MONOTONIC, OMP_CLAUSE_SCHEDULE_NONMONOTONIC, OMP_CLAUSE_SCHEDULE_RUNTIME, OMP_CLAUSE_SCHEDULE_SIMD, OMP_CLAUSE_SCHEDULE_STATIC, OMP_CLAUSE_SECTIONS, OMP_CLAUSE_SELF, OMP_CLAUSE_SELF_EXPR, OMP_CLAUSE_SEQ, OMP_CLAUSE_SHARED, OMP_CLAUSE_SIMD, OMP_CLAUSE_SIMDLEN, OMP_CLAUSE_SIMDLEN_EXPR, OMP_CLAUSE_SIZE, OMP_CLAUSE_SIZES, OMP_CLAUSE_SIZES_LIST, OMP_CLAUSE_TASK_REDUCTION, OMP_CLAUSE_TASKGROUP, OMP_CLAUSE_THREAD_LIMIT, OMP_CLAUSE_THREAD_LIMIT_EXPR, OMP_CLAUSE_THREADS, OMP_CLAUSE_TILE, OMP_CLAUSE_TILE_LIST, OMP_CLAUSE_TO, OMP_CLAUSE_UNIFORM, OMP_CLAUSE_UNTIED, OMP_CLAUSE_USE, OMP_CLAUSE_USE_DEVICE_ADDR, OMP_CLAUSE_USE_DEVICE_PTR, OMP_CLAUSE_USE_DEVICE_PTR_IF_PRESENT, OMP_CLAUSE_VECTOR, OMP_CLAUSE_VECTOR_EXPR, OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_VECTOR_LENGTH_EXPR, OMP_CLAUSE_WAIT, OMP_CLAUSE_WAIT_EXPR, OMP_CLAUSE_WORKER, OMP_CLAUSE_WORKER_EXPR, op_symbol_code(), pp_character(), pp_colon, pp_comma, pp_left_paren, pp_minus, pp_plus, pp_right_bracket, pp_right_paren, pp_space, pp_string(), TREE_CHAIN, TREE_CODE, TREE_PURPOSE, and TREE_VALUE.
Referenced by dump_omp_clauses().
void dump_omp_clauses | ( | pretty_printer * | pp, |
tree | clause, | ||
int | spc, | ||
dump_flags_t | flags, | ||
bool | leading_space ) |
Dump chain of OMP clauses. PP, SPC and FLAGS are as in dump_generic_node.
References dump_omp_clause(), OMP_CLAUSE_CHAIN, and pp_space.
Referenced by dump_generic_node(), dump_gimple_omp_critical(), dump_gimple_omp_dispatch(), dump_gimple_omp_for(), dump_gimple_omp_masked(), dump_gimple_omp_ordered(), dump_gimple_omp_parallel(), dump_gimple_omp_scan(), dump_gimple_omp_scope(), dump_gimple_omp_sections(), dump_gimple_omp_single(), dump_gimple_omp_target(), dump_gimple_omp_task(), dump_gimple_omp_taskgroup(), and dump_gimple_omp_teams().
|
static |
Dump an OpenMP context selector CTX to PP.
References dump_generic_node(), error_mark_node, newline_and_indent(), omp_context_name_list_prop(), OMP_TP_NAME, OMP_TP_NAMELIST_NODE, OMP_TP_VALUE, OMP_TRAIT_INVALID, OMP_TS_CODE, OMP_TS_NAME, OMP_TS_PROPERTIES, OMP_TS_SCORE, OMP_TSS_NAME, OMP_TSS_TRAIT_SELECTORS, pp_comma, pp_space, pp_string(), pretty_print_string(), and TREE_CHAIN.
Referenced by print_omp_context_selector().
|
static |
Dump OpenMP's prefer_type of the init clause.
References NULL_TREE, omp_get_name_from_fr_id(), pp_character(), pp_right_paren, pp_string(), and TREE_STRING_POINTER.
Referenced by dump_omp_clause().
|
static |
Dump OpenMP iterators ITER.
References dump_generic_node(), pp_colon, pp_equal, pp_right_paren, pp_space, pp_string(), TREE_CHAIN, TREE_TYPE, and TREE_VEC_ELT.
Referenced by dump_omp_clause().
void dump_omp_loop_non_rect_expr | ( | pretty_printer * | pp, |
tree | node, | ||
int | spc, | ||
dump_flags_t | flags ) |
Helper function for dump_generic_node. Dump INIT or COND expression for OpenMP loop non-rectangular iterators.
References dump_generic_node(), gcc_assert, op_code_prio(), op_prio(), pp_left_paren, pp_right_paren, pp_string(), TREE_CODE, and TREE_VEC_ELT.
Referenced by dump_generic_node(), and dump_gimple_omp_for().
|
static |
|
static |
References INDENT, and pp_newline().
Referenced by do_niy(), dump_block_node(), dump_generic_node(), and dump_omp_context_selector().
int op_code_prio | ( | enum tree_code | code | ) |
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.
References CASE_CONVERT.
Referenced by dump_binary_rhs(), dump_omp_loop_non_rect_expr(), dump_unary_rhs(), and op_prio().
int op_prio | ( | const_tree | op | ) |
Return the priority of the operator OP.
References NULL, op_code_prio(), op_prio(), TREE_CODE, and TREE_OPERAND.
Referenced by dump_binary_rhs(), dump_generic_node(), dump_omp_loop_non_rect_expr(), dump_unary_rhs(), and op_prio().
|
static |
Pretty formatting of GENERIC trees in C syntax. Copyright (C) 2001-2024 Free Software Foundation, Inc. Adapted from c-pretty-print.cc by Diego Novillo <dnovillo@redhat.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 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/>.
Routines in this file get invoked via the default tree printer used by diagnostics and thus they are called from pp_printf which isn't reentrant. Avoid using pp_printf in this file.
Disable warnings about quoting issues in the pp_xxx calls below that (intentionally) don't follow GCC diagnostic conventions.
Local functions, macros and variables.
Return the symbol associated with operator OP.
References op_symbol_code(), and TREE_CODE.
Referenced by dump_generic_node().
const char * op_symbol_code | ( | enum tree_code | code, |
dump_flags_t | flags ) |
Return the symbol associated with operator CODE.
References TDF_GIMPLE.
Referenced by dump_binary_rhs(), dump_chain(), dump_condition(), dump_gimple_cond(), dump_omp_clause(), dump_pred_info(), eliminate_redundant_comparison(), maybe_optimize_sub_cmp_0(), op_symbol(), and optimize_range_tests_var_bound().
void pp_double_int | ( | pretty_printer * | pp, |
double_int | d, | ||
bool | uns ) |
Dump double_int D to pretty_printer PP. UNS is true if D is unsigned and false otherwise.
References double_int::fits_shwi(), double_int::fits_uhwi(), double_int::high, HOST_WIDE_INT_PRINT_DOUBLE_HEX, double_int::is_negative(), double_int::low, pp_buffer(), pp_minus, pp_string(), pp_unsigned_wide_integer, and pp_wide_integer().
void pp_tree_identifier | ( | pretty_printer * | pp, |
tree | id ) |
Print the identifier ID to PRETTY-PRINTER.
References IDENTIFIER_LENGTH, IDENTIFIER_POINTER, identifier_to_locale(), pp_append_text(), and pp_translate_identifiers().
Referenced by asan_add_global(), asan_emit_stack_protection(), dump_decl_name(), dump_fancy_name(), and dump_generic_node().
void pretty_print_string | ( | pretty_printer * | pp, |
const char * | str, | ||
size_t | n ) |
Print the first N characters in the array STR, replacing non-printable characters (including embedded nuls) with unambiguous escape sequences.
References NULL, pp_character(), and pp_string().
Referenced by dump_generic_node(), dump_omp_context_selector(), and print_value().
void print_call_name | ( | pretty_printer * | pp, |
tree | node, | ||
dump_flags_t | flags ) |
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.
References CASE_CONVERT, dump_function_name(), dump_generic_node(), integer_zerop(), NIY, pp_left_paren, pp_string(), TREE_CODE, TREE_OPERAND, and VAR_P.
Referenced by dump_generic_node(), and dump_gimple_call().
void print_declaration | ( | pretty_printer * | pp, |
tree | t, | ||
int | spc, | ||
dump_flags_t | flags ) |
Print the declaration of a variable.
References DECL_ASSEMBLER_NAME, DECL_EXTERNAL, DECL_HARD_REGISTER, DECL_HAS_VALUE_EXPR_P, DECL_INITIAL, DECL_REGISTER, DECL_VALUE_EXPR, dump_array_domain(), dump_decl_name(), dump_function_declaration(), dump_generic_node(), HAS_RTL_P, INDENT, pp_equal, pp_left_paren, pp_right_bracket, pp_right_paren, pp_semicolon, pp_space, pp_string(), TDF_SLIM, TREE_CODE, TREE_PUBLIC, TREE_STATIC, TREE_TYPE, TYPE_DOMAIN, and VAR_P.
Referenced by dump_generic_node(), dump_gimple_bind(), print_generic_decl(), and print_struct_decl().
void print_generic_decl | ( | FILE * | file, |
tree | decl, | ||
dump_flags_t | flags ) |
Prints declaration DECL to the FILE with details specified by FLAGS.
References maybe_init_pretty_print(), pp_write_text_to_stream(), print_declaration(), and tree_pp.
Referenced by dump_enumerated_decls(), dump_function_to_file(), dump_scope_block(), and oacc_privatization_candidate_p().
void print_generic_expr | ( | FILE * | file, |
tree | t, | ||
dump_flags_t | flags ) |
Print a single expression T on file FILE. FLAGS specifies details to show in the dump. See TDF_* in dumpfile.h.
References dump_generic_node(), maybe_init_pretty_print(), pp_flush(), and tree_pp.
Referenced by infer_range_manager::add_range(), scev_dfs::add_to_evolution(), autofdo::afdo_indirect_call(), analyze_access_subtree(), analyze_all_variable_accesses(), analyze_evolution_in_loop(), analyze_initial_condition(), analyze_overlapping_iterations(), analyze_scalar_evolution(), assign_calc_vals_to_header_phis(), assign_known_vals_to_header_phis(), assign_vals_to_header_phis(), attempt_builtin_copysign(), attempt_builtin_powi(), attempt_coalesce(), eliminate_dom_walker::before_dom_children(), ipcp_modif_dom_walker::before_dom_children(), substitute_and_fold_dom_walker::before_dom_children(), budget_for_propagation_access(), build_access_from_call_arg(), assume_query::calculate_op(), assume_query::calculate_phi(), call_may_clobber_ref_p_1(), canonicalize_loop_induction_variables(), gimple_infer_range::check_assume_func(), chrec_apply(), clean_up_loop_closed_phi(), collect_object_sizes_for(), ipa_polymorphic_call_context::combine_with(), compute_affine_dependence(), compute_builtin_object_size(), compute_dependence_clique(), gori_compute::compute_logical_operands(), gori_compute::compute_operand1_range(), gori_compute::compute_operand2_range(), gori_compute::compute_operand_range(), path_range_query::compute_ranges_in_block(), cprop_operand(), create_access(), create_access_replacement(), create_canonical_iv(), create_data_ref(), debug_generic_expr(), debug_omp_tokenized_addr(), debug_ter(), debug_tree_chain(), debug_var_infos_r(), determine_group_iv_costs(), disqualify_candidate(), access_ref::dump(), back_threader::dump(), block_range_cache::dump(), block_range_cache::dump(), cgraph_node::dump(), equiv_chain::dump(), gori_map::dump(), ipa_argagg_value_list::dump(), ipa_polymorphic_call_context::dump(), path_range_query::dump(), phi_group::dump(), pointer_query::dump(), range_def_chain::dump(), ssa_cache::dump(), value_relation::dump(), dump_access(), dump_access_strides(), dump_affine_function(), dump_affine_iv(), gimple_ranger::dump_bb(), dump_builtin_memref(), dump_cand(), dump_candidate(), dump_chain(), dump_coalesce_list(), dump_condition(), dump_copy_of(), dump_currdefs(), dump_default_def(), dump_defs_stack(), dump_dref(), dump_eh_tree(), dump_function_to_file(), dump_immediate_uses_for(), dump_incr_vec(), dump_induction(), dump_iv(), dump_lattice_value(), dump_live_info(), dump_lto_records(), dump_mem_address(), dump_mem_details(), dump_mem_ref(), dump_names_replaced_by(), dump_odr_type(), dump_ops_vector(), dump_part_var_map(), dump_points_to_info_for(), dump_possible_polymorphic_call_targets(), dump_pred_info(), dump_range_entry(), dump_ranger(), dump_replaceable_exprs(), dump_stack_var_partition(), dump_strlen_info(), dump_subscript(), dump_tm_memopt_set(), dump_tree_via_hooks(), dump_update_ssa(), dump_use(), dump_var_map(), dump_variable(), dynamic_object_sizes_execute_one(), gori_compute::edge_range_p(), rpo_elim::eliminate_avail(), eliminate_duplicate_pair(), eliminate_dom_walker::eliminate_insert(), eliminate_not_pairs(), eliminate_plus_minus_pair(), rpo_elim::eliminate_push_avail(), eliminate_redundant_comparison(), eliminate_redundant_computations(), eliminate_dom_walker::eliminate_stmt(), execute_sm(), execute_sm_exit(), expansion_failed(), extr_type_from_vtbl_ptr_store(), crc_symbolic_execution::extract_polynomial(), factor_out_conditional_operation(), fail_abnormal_edge_coalesce(), ranger_cache::fill_block_cache(), final_value_replacement_loop(), find_induction_variables(), find_local_vars_to_propagate(), ccp_folder::fold_stmt(), forward_propagate_into_gimple_cond(), gather_chrec_stats(), gather_mem_refs_stmt(), gather_memory_references_ref(), ipa_polymorphic_call_context::get_dynamic_type(), get_rank(), get_replacement_map(), get_representative_for(), get_scalar_evolution(), gimple_fold_call(), gimple_fold_stmt_to_constant_1(), gimple_lower_bitint(), gimple_simplify_phiopt(), gimple_verify_flow_info(), gimplify_expr(), ifcombine_ifandif(), insert_phi_nodes_for(), insert_value_copy_on_edge(), instantiate_scev(), ipa_dump_jump_function(), ipa_dump_param(), ipa_print_constant_value(), path_oracle::killing_def(), simplify_using_ranges::legacy_fold_cond(), mark_operand_necessary(), cgraph_node::materialize_clone(), maybe_add_sra_candidate(), maybe_invalidate(), maybe_optimize_var(), ipa_polymorphic_call_context::meet_with(), ipa_param_body_adjustments::modify_expression(), movement_possibility_1(), number_of_iterations_cond(), number_of_latch_executions(), object_sizes_execute(), optimize_range_tests_var_bound(), optimize_vec_cond_expr(), param_change_prob(), phiprop_insert_phi(), const_and_copies::pop_to_marker(), predict_loops(), gimple_ranger::prefill_stmt_dependencies(), expr_hash_elt::print(), print_aff(), print_loop_info(), print_mem_expr(), print_pre_expr(), print_vn_reference_ops(), process_bb(), phi_analyzer::process_phi(), ranger_cache::propagate_cache(), ranger_cache::propagate_updated_value(), path_range_query::range_defined_in_block(), ranger_cache::range_from_dom(), fold_using_range::range_of_call(), dom_ranger::range_of_expr(), gimple_ranger::range_of_expr(), fold_using_range::range_of_phi(), fold_using_range::range_of_range_op(), gimple_ranger::range_of_stmt(), dom_ranger::range_on_edge(), gimple_ranger::range_on_edge(), gimple_ranger::range_on_entry(), gimple_ranger::range_on_exit(), relation_oracle::record(), const_and_copies::record_const_or_copy_raw(), record_equivalences_from_stmt(), record_estimate(), record_known_type(), record_modified(), record_nonwrapping_chrec(), record_nonwrapping_iv(), ref_maybe_used_by_call_p_1(), reject(), fold_using_range::relation_fold_and_or(), ipa_param_body_adjustments::replace_removed_params_ssa_names(), cgraph_edge::resolve_speculation(), rewrite_trees(), run_rpo_vn(), set_range_info(), set_scalar_evolution(), set_ssa_val_to(), sort_and_splice_var_accesses(), split_at_bb_p(), ssa_base_cand_dump_callback(), stmt_kills_ref_p(), tm_log_emit(), tm_memopt_accumulate_memops(), range_tracer::trailer(), try_create_reduction_list(), undistribute_ops_list(), assume_query::update_parms(), update_range_test(), update_ssa(), value_replacement(), verify_def(), verify_imm_links(), verify_live_on_entry(), verify_ssa(), verify_use(), verify_vssa(), ccp_propagate::visit_phi(), visit_phi(), visit_reference_op_load(), visit_reference_op_store(), visit_stmt(), VN_INFO(), vn_nary_build_or_lookup_1(), vn_nary_op_insert_pieces_predicated(), and vn_reference_insert().
char * print_generic_expr_to_str | ( | tree | t | ) |
Print a single expression T to string, and return it. The caller must free the returned memory.
References dump_generic_node(), pp_formatted_text(), TDF_MEMSYMS, and TDF_VOPS.
Referenced by add_desc_attribute().
void print_generic_stmt | ( | FILE * | file, |
tree | t, | ||
dump_flags_t | flags ) |
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(), maybe_init_pretty_print(), pp_newline_and_flush(), and tree_pp.
Referenced by create_data_ref(), debug_generic_stmt(), dump_data_dependence_relation(), dump_data_reference(), eliminate_duplicate_pair(), fail_abnormal_edge_coalesce(), simplify_using_ranges::legacy_fold_cond(), maybe_optimize_arith_overflow(), and verify_phi_args().
void print_generic_stmt_indented | ( | FILE * | file, |
tree | t, | ||
dump_flags_t | flags, | ||
int | indent ) |
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.
References dump_generic_node(), i, maybe_init_pretty_print(), pp_newline_and_flush(), pp_space, and tree_pp.
Referenced by dump_function_to_file().
void print_omp_context_selector | ( | FILE * | file, |
tree | t, | ||
dump_flags_t | flags ) |
Wrapper for above, used for "declare variant". Compare to print_generic_expr.
References dump_omp_context_selector(), maybe_init_pretty_print(), pp_flush(), and tree_pp.
Referenced by dump_function_to_file().
|
static |
Prints a structure: name, fields, and methods. FIXME: Still incomplete.
References DECL_CHAIN, dump_generic_node(), INDENT, pp_left_brace, pp_newline(), pp_right_brace, pp_string(), print_declaration(), TDF_NONE, TREE_CODE, TREE_TYPE, TYPE_FIELDS, and TYPE_NAME.
Referenced by dump_generic_node().
|
static |