GCC Middle and Back End API Reference
|
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "statistics.h"
#include "vec.h"
#include "read-md.h"
Functions | |
hashval_t | leading_string_hash (const void *def) |
int | leading_string_eq_p (const void *def1, const void *def2) |
static hashval_t | leading_ptr_hash (const void *def) |
static int | leading_ptr_eq_p (const void *def1, const void *def2) |
static void | ATTRIBUTE_PRINTF (2, 0) message_at_1(file_location loc |
vfprintf (stderr, msg, ap) | |
fputc ('\n', stderr) | |
void | message_at (file_location loc, const char *msg,...) |
void | error_at (file_location loc, const char *msg,...) |
void | fatal_at (file_location loc, const char *msg,...) |
void | fatal_with_file_and_line (const char *msg,...) |
void | fatal_expected_char (int expected, int actual) |
int | read_skip_spaces (void) |
int | n_comma_elts (const char *s) |
const char * | scan_comma_elt (const char **pstr) |
void | upcase_string (char *string) |
static struct md_constant * | add_constant (htab_t defs, char *name, char *value, struct enum_type *parent_enum) |
static char * | md_decimal_string (int number) |
Variables | |
int | have_error = 0 |
void(* | include_callback )(const char *) |
md_reader * | md_reader_ptr |
static void const char * | msg |
static void const char va_list | ap |
|
static |
Add a NAME = VALUE definition to md_constants-style hash table DEFS, where both NAME and VALUE are malloc()ed strings. PARENT_ENUM is the enum to which NAME belongs, or null if NAME is a stand-alone constant.
References defs, fatal_with_file_and_line(), free(), md_constant::name, md_constant::parent_enum, and md_constant::value.
Referenced by md_reader::handle_constants(), and md_reader::handle_enum().
|
static |
A vfprintf-like function for reporting an error against line LINENO of the current MD file.
void error_at | ( | file_location | loc, |
const char * | msg, | ||
... ) |
Like message_at, but treat the condition as an error.
References ap, have_error, and msg.
Referenced by md_reader::handle_enum(), md_reader::handle_include(), and md_reader::read_skip_construct().
void fatal_at | ( | file_location | loc, |
const char * | msg, | ||
... ) |
void fatal_expected_char | ( | int | expected, |
int | actual ) |
Report that we found character ACTUAL when we expected to find character EXPECTED.
References fatal_with_file_and_line().
Referenced by md_reader::handle_constants(), md_reader::handle_file(), rtx_reader::read_rtx_operand(), md_reader::require_char(), and md_reader::require_char_ws().
void fatal_with_file_and_line | ( | const char * | msg, |
... ) |
A printf-like function for reporting an error against the current position in the MD file.
References ap, md_reader::get_colno(), md_reader::get_filename(), md_reader::get_lineno(), i, md_reader_ptr, msg, read_char(), unread_char(), and vfprintf().
Referenced by add_constant(), add_mapping(), fatal_expected_char(), find_code(), find_mode(), function_reader::parse_function(), parse_note_insn_name(), parse_reg_note_name(), md_reader::read_braced_string(), read_flags(), md_reader::read_name(), md_reader::read_name_1(), rtx_reader::read_rtx_operand(), read_skip_spaces(), md_reader::read_string(), md_reader::require_word_ws(), rtx_reader::rtx_alloc_for_name(), validate_const_int(), and validate_const_wide_int().
fputc | ( | '\n' | , |
stderr | ) |
Referenced by asm_show_source(), assemble_integer_with_op(), check_all_va_list_escapes(), gimple_infer_range::check_assume_func(), compute_branch_probabilities(), gori_compute::compute_operand1_range(), gori_compute::compute_operand2_range(), cond_exec_find_if_block(), connect_traces(), convert_all_function_calls(), cse_dump_path(), debug(), debug_df_chain(), debug_helper(), debug_helper(), debug_helper(), debug_omp_tokenized_addr(), debug_range_entry(), debug_value_data(), debug_vn_reference_ops(), decompose_register(), def_target_insn(), default_print_patchable_function_entry(), diagnostic_cb(), access_ref::dump(), assume_query::dump(), equiv_oracle::dump(), gori_map::dump(), phi_group::dump(), pointer_query::dump(), predicate::dump(), value_relation::dump(), dump_bb(), dump_bb_info(), dump_cselib_table(), dump_cselib_val(), dump_edge_info(), dump_eh_tree(), dump_gimple_bb_header(), dump_memory_report(), dump_pred_chain(), dump_pred_info(), dump_range_entry(), dump_stack_var_partition(), dump_strlen_info(), dump_var(), dw2_asm_output_addr(), dw2_asm_output_addr_rtx(), dw2_asm_output_data_sleb128(), dw2_asm_output_data_sleb128_raw(), dw2_asm_output_data_uleb128(), dw2_asm_output_data_uleb128_raw(), dw2_asm_output_delta(), dw2_asm_output_delta_uleb128(), dw2_asm_output_encoded_addr_rtx(), dw2_asm_output_nstring(), dw2_asm_output_offset(), dw2_asm_output_offset(), dw2_asm_output_symname_uleb128(), dwarf2out_do_cfi_startproc(), error(), error_at_line(), execute(), fancy_abort(), fatal(), md_reader::fprint_c_condition(), fprintf_indent(), c_expr::gen_transform(), generic_type_p(), init_asm_output(), predicate::init_from_control_deps(), internal_error(), log_op_type(), gori_compute::logical_combine(), maybe_invalidate(), driver::maybe_print_and_exit(), new_cselib_val(), optimize_va_list_gpr_fpr_size(), optimize_vec_cond_expr(), output_addr_table(), output_cfa_loc_raw(), output_cfi_directive(), output_loc_operands(), output_loc_operands_raw(), output_loc_sequence_raw(), parse_error(), back_threader_profitability::possibly_profitable_path_p(), pp_write_text_as_dot_label_to_stream(), pp_write_text_as_html_like_dot_to_stream(), print_curr_insn_alt(), mem_usage::print_dash_line(), print_decl_identifier(), print_mem_expr(), print_node(), range_tracer::print_prefix(), print_real_cst(), rtx_writer::print_rtx(), print_rtx_insn_vec(), rtx_writer::print_rtx_operand_code_0(), rtx_writer::print_rtx_operand_code_i(), rtx_writer::print_rtx_operand_code_r(), process_options(), phi_analyzer::process_phi(), back_threader_profitability::profitable_path_p(), fold_using_range::range_of_range_op(), dom_ranger::range_on_edge(), record_reg_classes(), dom_oracle::register_transitives(), fold_using_range::relation_fold_and_or(), run_gcc(), set_range_info(), range_tracer::trailer(), val_resolve(), verify_flow_info(), warning(), write_digit(), and write_upcase().
|
static |
Return true if DEF1 and DEF2 are pointers to the same pointer.
Referenced by md_reader::md_reader().
|
static |
Return a hash value for the pointer pointed to by DEF.
Referenced by md_reader::md_reader().
int leading_string_eq_p | ( | const void * | def1, |
const void * | def2 ) |
Given two objects that start with char * name fields, return true if they have the same name.
Referenced by initialize_iterators(), and md_reader::md_reader().
hashval_t leading_string_hash | ( | const void * | def | ) |
Given an object that starts with a char * name field, return a hash code for its name.
Referenced by initialize_iterators(), and md_reader::md_reader().
|
static |
Return a malloc()ed decimal string that represents number NUMBER.
References md_name::buffer, and CHAR_BIT.
Referenced by md_reader::handle_enum().
void message_at | ( | file_location | loc, |
const char * | msg, | ||
... ) |
A printf-like function for reporting a message against location LOC.
Referenced by add_constraint(), compute_test_codes(), gen_attr(), mdep_constraint_len(), note_constraint(), process_template(), validate_exp(), validate_optab_operands(), validate_pattern(), and VEC_safe_set_locstr().
int n_comma_elts | ( | const char * | s | ) |
Given a string, return the number of comma-separated elements in it. Return 0 for the null string.
Referenced by check_attr_test(), convert_set_attr(), and count_alternatives().
int read_skip_spaces | ( | void | ) |
Read chars from the MD file until a non-whitespace char and return that. Comments, both Lisp style and C style, are treated as whitespace.
References fatal_with_file_and_line(), read_char(), and unread_char().
Referenced by function_reader::extra_parsing_for_operand_code_0(), function_reader::handle_any_trailing_information(), md_reader::handle_constants(), md_reader::handle_enum(), md_reader::handle_file(), function_reader::maybe_read_location(), function_reader::parse_block(), function_reader::parse_edge(), function_reader::parse_function(), function_reader::parse_insn_chain(), md_reader::read_name_1(), rtx_reader::read_rtx_code(), rtx_reader::read_rtx_operand(), function_reader::read_rtx_operand_r(), rtx_reader::read_rtx_variadic(), md_reader::read_skip_construct(), md_reader::read_string(), rtx_reader::read_until(), and md_reader::require_char_ws().
const char * scan_comma_elt | ( | const char ** | pstr | ) |
Given a pointer to a (char *), return a pointer to the beginning of the next comma-separated element in the string. Advance the pointer given to the end of that element. Return NULL if at end of string. Caller is responsible for copying the string if necessary. White space between a comma and an element is ignored.
References NULL.
Referenced by compute_test_codes(), gen_attr(), gen_mnemonic_attr(), next_comma_elt(), write_match_code(), and write_match_code_switch().
void upcase_string | ( | char * | string | ) |
Convert STRING to uppercase.
References i.
Referenced by md_reader::handle_enum(), and print_enum_type().
Referenced by diagnostic_cb(), dw2_asm_output_addr(), dw2_asm_output_addr_rtx(), dw2_asm_output_data(), dw2_asm_output_data_sleb128(), dw2_asm_output_data_uleb128(), dw2_asm_output_delta(), dw2_asm_output_delta_uleb128(), dw2_asm_output_encoded_addr_rtx(), dw2_asm_output_nstring(), dw2_asm_output_offset(), dw2_asm_output_offset(), dw2_asm_output_symname_uleb128(), error(), error_at_line(), fatal(), fatal_with_file_and_line(), fnotice(), fp_decl(), fprintf_indent(), internal_error(), notice(), notice_translated(), parse_error(), and warning().
void const char va_list ap |
Referenced by simple_diagnostic_path::add_event(), simple_diagnostic_path::add_thread_event(), bitmap_and(), bitmap_and_compl(), bitmap_and_or(), bitmap_intersect_p(), bitmap_ior(), bitmap_ior_and_compl(), bitmap_or_and(), bitmap_subset_p(), bitmap_xor(), build_call_expr(), build_call_expr_internal_loc(), build_call_expr_loc(), build_call_nofold_loc(), build_message_string(), conflict_fn(), diagnostic_append_note(), diagnostic_cb(), diagnostic_context::diagnostic_impl(), diagnostic_context::diagnostic_n_impl(), dump_printf(), dump_printf_loc(), dump_context::dump_printf_loc_va(), dump_context::dump_printf_va(), dw2_asm_output_addr(), dw2_asm_output_addr_rtx(), dw2_asm_output_data(), dw2_asm_output_data_sleb128(), dw2_asm_output_data_uleb128(), dw2_asm_output_delta(), dw2_asm_output_delta_uleb128(), dw2_asm_output_encoded_addr_rtx(), dw2_asm_output_nstring(), dw2_asm_output_offset(), dw2_asm_output_offset(), dw2_asm_output_symname_uleb128(), emit_diagnostic(), emit_diagnostic(), emit_diagnostic_valist(), emit_diagnostic_valist_meta(), format_string_diagnostic_t::emit_warning(), format_string_diagnostic_t::emit_warning_n(), format_string_diagnostic_t::emit_warning_n_va(), format_string_diagnostic_t::emit_warning_va(), error(), error(), error_at(), error_at(), error_at(), error_at_line(), error_for_asm(), error_meta(), error_n(), expand_ifn_va_arg_1(), fatal(), fatal_at(), fatal_at(), fatal_at(), fatal_error(), fatal_with_file_and_line(), fnotice(), fp_decl(), fprintf_indent(), gimple_build_call(), gimple_build_call_internal(), gimple_build_call_valist(), gimplify_modify_expr(), handle_braces(), opt_pointer_wrapper< PtrType_t >::if(), opt_result::if(), inform(), inform(), inform_n(), internal_error(), internal_error(), internal_error_no_backtrace(), issue_prefetch_ref(), ana::log_user::log(), ana::log_scope::log_scope(), lto_tag_check_set(), maybe_build_call_expr_loc(), message_at(), notice(), notice_translated(), opt_problem::opt_problem(), optimize_va_list_gpr_fpr_size(), opts_concat(), output_operand_lossage(), parse_error(), pedwarn(), pedwarn(), permerror(), permerror(), permerror_opt(), permerror_opt(), pp_printf(), pp_verbatim(), graphviz_out::print(), printf_indent(), graphviz_out::println(), ipa_predicate::remap_after_inlining(), rewrite_call_expr(), sorry(), sorry_at(), update_gimple_call(), va_list_counter_op(), va_list_counter_struct_op(), va_list_ptr_read(), va_list_ptr_write(), validate_arglist(), validate_gimple_arglist(), verbatim(), warning(), warning(), warning_at(), warning_at(), warning_at(), warning_at(), warning_for_asm(), warning_meta(), warning_n(), and warning_n().
int have_error = 0 |
MD reader for GCC. Copyright (C) 1987-2024 Free Software Foundation, Inc. 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/>.
This file is compiled twice: once for the generator programs once for the compiler.
Minimal reimplementation of errors.cc for use by RTL frontend within cc1.
Referenced by error_at().
void(* include_callback) (const char *) | ( | const char * | ) |
This callback will be invoked whenever an md include directive is processed. To be used for creation of the dependency file.
Referenced by md_reader::handle_include(), and main().
md_reader* md_reader_ptr |
Global singleton.
Referenced by fatal_with_file_and_line(), md_reader::md_reader(), read_char(), unread_char(), write_insn_preds_c(), write_tm_constrs_h(), write_tm_preds_h(), and md_reader::~md_reader().
void const char* msg |
Referenced by bt_err_callback(), build_message_string(), fnfilter::compile(), dbgprint_count_type_at(), diagnostic_cb(), diagnostic_for_asm(), diagnostic_set_info_translated(), predicate::dump(), dump_fixup_graph(), error_at(), error_at_line(), error_unavailable_use(), fatal_at(), fatal_at(), fatal_at(), fatal_reading_state(), fatal_with_file_and_line(), sarif_builder::make_message_object(), sarif_builder::make_multiformat_message_string(), maybe_add_sra_candidate(), message_at(), parse_error(), pp_printf(), pp_verbatim(), reject(), report_ploop_op(), report_vect_op(), type_internals_preclude_sra_p(), type_internals_preclude_sra_p_1(), warn_deprecated_use(), warning_at(), and warning_at().