GCC Middle and Back End API Reference
|
Data Structures | |
struct | uid_hash |
Public Member Functions | |
function_reader () | |
~function_reader () | |
void | handle_unknown_directive (file_location, const char *) final override |
rtx | read_rtx_operand (rtx x, int idx) final override |
void | handle_any_trailing_information (rtx x) final override |
rtx | postprocess (rtx) final override |
const char * | finalize_string (char *stringbuf) final override |
rtx_insn ** | get_insn_by_uid (int uid) |
tree | parse_mem_expr (const char *desc) |
bool | read_rtx (const char *rtx_name, vec< rtx > *rtxen) |
rtx | rtx_alloc_for_name (const char *) |
rtx | read_rtx_code (const char *code_name) |
rtx | read_nested_rtx () |
rtx | read_rtx_variadic (rtx form) |
char * | read_until (const char *terminator_chars, bool consume_terminator) |
bool | read_md_files (int, const char **, bool(*)(const char *)) |
bool | read_file (const char *filename) |
bool | read_file_fragment (const char *filename, int first_line, int last_line) |
file_location | get_current_location () const |
bool | is_compact () const |
int | read_char (void) |
void | unread_char (int ch) |
file_location | read_name (struct md_name *name) |
file_location | read_name_or_nil (struct md_name *) |
void | read_escape () |
char * | read_quoted_string () |
char * | read_braced_string () |
char * | read_string (int star_if_braced) |
void | read_skip_construct (int depth, file_location loc) |
void | require_char (char expected) |
void | require_char_ws (char expected) |
void | require_word_ws (const char *expected) |
int | peek_char (void) |
void | set_md_ptr_loc (const void *ptr, file_location) |
const struct ptr_loc * | get_md_ptr_loc (const void *ptr) |
void | copy_md_ptr_loc (const void *new_ptr, const void *old_ptr) |
void | fprint_md_ptr_loc (FILE *outf, const void *ptr) |
void | print_md_ptr_loc (const void *ptr, FILE *=stdout) |
struct enum_type * | lookup_enum_type (const char *name) |
void | traverse_enum_types (htab_trav callback, void *info) |
void | handle_constants () |
void | traverse_md_constants (htab_trav callback, void *info) |
void | handle_enum (file_location loc, bool md_p) |
const char * | join_c_conditions (const char *cond1, const char *cond2) |
void | fprint_c_condition (FILE *outf, const char *cond) |
void | print_c_condition (FILE *outf, const char *cond) |
const char * | apply_iterator_to_string (const char *string) |
rtx | copy_rtx_for_iterators (rtx original) |
void | read_conditions () |
void | record_potential_iterator_use (struct iterator_group *group, file_location loc, rtx x, unsigned int index, const char *name) |
struct mapping * | read_mapping (struct iterator_group *group, htab_t table) |
overloaded_name * | handle_overloaded_name (rtx, vec< mapping * > *) |
const char * | get_top_level_filename () const |
const char * | get_filename () const |
int | get_lineno () const |
int | get_colno () const |
struct obstack * | get_string_obstack () |
htab_t | get_md_constants () |
overloaded_name * | get_overloads () const |
Protected Attributes | |
bool | m_in_call_function_usage |
auto_vec< rtx > | m_reuse_rtx_by_id |
Private Attributes | |
hash_map< uid_hash, rtx_insn * > | m_insns_by_uid |
auto_vec< fixup * > | m_fixups |
rtx_insn * | m_first_insn |
auto_vec< tree > | m_fake_scope |
char * | m_name |
bool | m_have_crtl_directive |
basic_block | m_bb_to_insert_after |
auto_vec< deferred_edge > | m_deferred_edges |
int | m_highest_bb_idx |
bool | m_compact |
const char * | m_toplevel_fname |
char * | m_base_dir |
FILE * | m_read_md_file |
const char * | m_read_md_filename |
int | m_read_md_lineno |
int | m_read_md_colno |
int | m_last_line_colno |
file_name_list * | m_first_dir_md_include |
file_name_list ** | m_last_dir_md_include_ptr |
struct obstack | m_string_obstack |
htab_t | m_ptr_locs |
struct obstack | m_ptr_loc_obstack |
htab_t | m_joined_conditions |
struct obstack | m_joined_conditions_obstack |
htab_t | m_md_constants |
htab_t | m_enum_types |
int | m_first_line |
int | m_last_line |
overloaded_name * | m_first_overload |
overloaded_name ** | m_next_overload_ptr |
htab_t | m_overloads_htab |
Subclass of rtx_reader for reading function dumps.
function_reader::function_reader | ( | ) |
class function_reader : public rtx_reader
function_reader's constructor.
References EXIT_BLOCK, false, m_bb_to_insert_after, m_first_insn, m_have_crtl_directive, m_highest_bb_idx, m_name, NULL, rtx_reader::rtx_reader(), and true.
function_reader::~function_reader | ( | ) |
function_reader's destructor.
References FOR_EACH_VEC_ELT, free(), i, m_fixups, and m_name.
|
private |
Record that at LOC we saw textual description DESC of the MEM_EXPR or REG_EXPR of INSN, so that the fields can be fixed up in later post-processing.
References gcc_assert, and m_fixups.
Referenced by handle_any_trailing_information(), and read_rtx_operand_r().
|
private |
Record that at LOC we saw an insn uid INSN_UID for the operand with index OPERAND_IDX within INSN, so that the pointer value can be fixed up in later post-processing.
References m_fixups.
Referenced by read_rtx_operand_u().
|
private |
Record that at LOC we saw an basic block index BB_IDX for the operand with index OPERAND_IDX within INSN, so that the pointer value can be fixed up in later post-processing.
References m_fixups.
Referenced by extra_parsing_for_operand_code_0().
|
private |
Placeholder hook for recording source location information seen in a dump. This is empty for now.
Referenced by maybe_read_location().
|
privateinherited |
Parse a -I option with argument ARG.
References md_reader::file_name_list::fname, m_last_dir_md_include_ptr, and md_reader::file_name_list::next.
|
private |
Apply all of the recorded fixups.
References fixup::apply(), FOR_EACH_VEC_ELT, i, and m_fixups.
Referenced by parse_function().
|
inherited |
Apply the current iterator values to STRING. Return the new string if any changes were needed, otherwise return STRING itself.
References copy_md_ptr_loc(), end(), get_md_ptr_loc(), md_reader::ptr_loc::loc, m_string_obstack, map_attr_string(), and map_value::string.
Referenced by copy_rtx_for_iterators().
When reading RTL function dumps, we must consolidate some rtx so that we use singletons where singletons are expected (e.g. we don't want multiple "(const_int 0 [0])" rtx, since these are tested via pointer equality against const0_rtx. Return the equivalent singleton rtx for X, if any, otherwise X.
References consolidate_reg(), gen_rtx_CONST_INT(), gen_rtx_CONST_VECTOR(), GET_CODE, GET_MODE, INTVAL, pc_rtx, ret_rtx, simple_return_rtx, and XVEC.
Referenced by handle_any_trailing_information(), parse_rtx(), postprocess(), and read_rtx_operand_r().
|
inherited |
Associate NEW_PTR with the same file position as OLD_PTR.
References get_md_ptr_loc(), md_reader::ptr_loc::loc, and set_md_ptr_loc().
Referenced by apply_iterator_to_string(), and rtx_reader::read_rtx_operand().
Return a deep copy of X, substituting the current iterator values into any strings.
References apply_iterator_to_string(), copy_rtx_for_iterators(), GET_CODE, GET_RTX_FORMAT, i, rtvec_alloc(), rtx_alloc(), RTX_CODE_SIZE, XEXP, XSTR, XTMPL, XVEC, XVECEXP, and XVECLEN.
Referenced by copy_rtx_for_iterators().
|
private |
Postprocessing subroutine for parse_insn_chain: all the basic blocks should have been created by now; create the edges that were seen.
References BASIC_BLOCK_FOR_FN, cfun, fatal_at(), FOR_EACH_VEC_ELT, i, m_deferred_edges, deferred_edge::m_dest_bb_idx, deferred_edge::m_flags, deferred_edge::m_loc, deferred_edge::m_src_bb_idx, and unchecked_make_edge().
Referenced by parse_insn_chain().
|
private |
Set up state for the function *before* fixups are applied. Create "cfun" and a decl for the function. By default, every function decl is hardcoded as int test_1 (int i, int j, int k); Set up various other state: - the cfg and basic blocks (edges are created later, *after* fixups are applied). - add the function to the callgraph.
References allocate_struct_function(), build_decl(), build_function_type_array(), cfun, current_function_decl, DECL_ARTIFICIAL, DECL_EXTERNAL, DECL_IGNORED_P, DECL_INITIAL, DECL_PRESERVE_P, DECL_RESULT, ENTRY_BLOCK_PTR_FOR_FN, EXIT_BLOCK_PTR_FOR_FN, cgraph_node::finalize_function(), gcc_assert, get_identifier(), init_empty_tree_cfg_for_function(), init_rtl_bb_info(), integer_type_node, m_bb_to_insert_after, m_name, make_node(), NULL_TREE, PROP_cfg, PROP_rtl, rtl_register_cfg_hooks(), and UNKNOWN_LOCATION.
Referenced by parse_function().
Additional parsing for format code '0' in dumps, handling a variety of special-cases in print_rtx, when parsing operand IDX of X. Return X, or possibly a reallocated copy of X.
References add_fixup_note_insn_basic_block(), error_at(), GET_CODE, ggc_internal_alloc(), NULL, md_reader::read_char(), md_reader::read_name(), read_skip_spaces(), md_reader::require_char(), md_reader::require_char_ws(), RTX_CODE, RTX_CODE_SIZE, RTX_HDR_SIZE, md_name::string, SYMBOL_REF_BLOCK, SYMBOL_REF_BLOCK_OFFSET, SYMBOL_REF_FLAGS, SYMBOL_REF_HAS_BLOCK_INFO_P, and md_reader::unread_char().
Referenced by read_rtx_operand().
|
finaloverridevirtual |
Implementation of rtx_reader::finalize_string for reading function dumps. Make a GC-managed copy of STRINGBUF.
Reimplemented from rtx_reader.
References ggc_strdup.
|
inherited |
Print condition COND to OUTF, wrapped in brackets. If COND was created by join_c_conditions, recursively invoke this function for the original conditions and join the result with "&&". Otherwise print a #line directive for COND if its original file position is known.
References fprint_c_condition(), fprint_md_ptr_loc(), fputc(), and m_joined_conditions.
Referenced by fprint_c_condition(), and print_c_condition().
|
inherited |
If PTR is associated with a known file position, print a #line directive for it to OUTF.
References file_location::filename, get_md_ptr_loc(), file_location::lineno, and md_reader::ptr_loc::loc.
Referenced by fprint_c_condition(), and print_md_ptr_loc().
|
inlineinherited |
References m_read_md_colno.
|
inherited |
References m_read_md_colno, m_read_md_filename, and m_read_md_lineno.
Referenced by function_reader::handle_any_trailing_information(), handle_file(), function_reader::maybe_read_location(), function_reader::parse_block(), function_reader::parse_edge(), function_reader::parse_function(), function_reader::parse_insn_chain(), function_reader::parse_param(), read_name_1(), read_name_or_nil(), function_reader::read_rtx_operand_r(), read_string(), and rtx_reader::rtx_alloc_for_name().
|
inlineinherited |
References m_read_md_filename.
Referenced by read_escape(), and rtx_reader::read_rtx_operand().
rtx_insn ** function_reader::get_insn_by_uid | ( | int | uid | ) |
Given a UID value, try to locate a pointer to the corresponding rtx_insn *, or NULL if it can't be found.
References m_insns_by_uid.
Referenced by fixup_insn_uid::apply().
|
inlineinherited |
References m_read_md_lineno.
Referenced by read_braced_string(), read_escape(), and rtx_reader::read_rtx_operand().
|
inlineinherited |
References m_md_constants.
Referenced by handle_enum(), and traverse_md_constants().
|
inherited |
Return the position associated with pointer PTR. Return null if no position was set.
References m_ptr_locs.
Referenced by apply_iterator_to_string(), copy_md_ptr_loc(), and fprint_md_ptr_loc().
|
inlineinherited |
References m_first_overload.
|
inlineinherited |
References m_string_obstack, and obstack.
Referenced by rtx_reader::read_rtx_operand(), and rtx_reader::rtx_alloc_for_name().
|
inlineinherited |
References m_toplevel_fname.
|
finaloverridevirtual |
Implementation of rtx_reader::handle_any_trailing_information. Handle the various additional information that print-rtl.cc can write after the regular fields, when parsing X.
Reimplemented from rtx_reader.
References add_fixup_expr(), consolidate_singletons(), free(), GET_CODE, md_reader::get_current_location(), md_reader::peek_char(), md_reader::read_char(), md_reader::read_name(), read_skip_spaces(), rtx_reader::read_until(), md_reader::require_char(), md_reader::require_char_ws(), set_mem_addr_space(), set_mem_alias_set(), set_mem_align(), set_mem_offset(), set_mem_size(), md_name::string, and md_reader::unread_char().
|
inherited |
Process a define_constants directive, starting with the optional space after the "define_constants".
References add_constant(), defs, fatal_expected_char(), m_md_constants, read_name(), read_skip_spaces(), require_char_ws(), and md_name::string.
Referenced by handle_file().
|
inherited |
Process a define_enum or define_c_enum directive, starting with the optional space after the "define_enum". LINENO is the line number on which the directive started and MD_P is true if the directive is a define_enum rather than a define_c_enum.
References add_constant(), enum_value::def, error_at(), get_md_constants(), m_enum_types, md_decimal_string(), enum_value::name, enum_value::next, NULL, read_name(), read_skip_spaces(), read_string(), require_char_ws(), md_name::string, unread_char(), and upcase_string().
Referenced by handle_file().
|
privateinherited |
Process the current file, assuming that read_md_file and read_md_filename are valid. Use HANDLE_DIRECTIVE to handle unknown directives.
References fatal_expected_char(), get_current_location(), handle_constants(), handle_enum(), handle_include(), handle_unknown_directive(), m_read_md_colno, m_read_md_file, m_read_md_lineno, read_name(), read_skip_spaces(), and require_char_ws().
Referenced by handle_include(), and handle_toplevel_file().
|
privateinherited |
Process an "include" directive, starting with the optional space after the "include". Read in the file and use HANDLE_DIRECTIVE to process each unknown directive. LINENO is the line number on which the "include" occurred.
References DIR_SEPARATOR, error_at(), md_reader::file_name_list::fname, fopen, free(), handle_file(), include_callback, m_base_dir, m_first_dir_md_include, m_read_md_colno, m_read_md_file, m_read_md_filename, m_read_md_lineno, md_reader::file_name_list::next, NULL, and read_string().
Referenced by handle_file().
|
private |
Postprocessing subroutine of function_reader::parse_function. Populate m_insns_by_uid.
References crtl, error(), get_insns(), INSN_UID(), m_insns_by_uid, max_uid, and NEXT_INSN().
Referenced by parse_function().
|
inherited |
|
privateinherited |
Like handle_file, but for top-level files. Set up m_toplevel_fname and m_base_dir accordingly.
References handle_file(), m_base_dir, m_read_md_filename, m_toplevel_fname, and NULL.
Referenced by read_file(), and read_file_fragment().
|
finaloverridevirtual |
Implementation of rtx_reader::handle_unknown_directive, for parsing the remainder of a directive with name NAME seen at START_LOC. Require a top-level "function" directive, as emitted by print_rtx_function, and parse it.
Implements md_reader.
References error(), fatal_at(), and parse_function().
|
inlineinherited |
References m_compact.
Referenced by function_reader::read_rtx_operand(), function_reader::read_rtx_operand_inL(), and function_reader::read_rtx_operand_u().
|
inherited |
Return a condition that satisfies both COND1 and COND2. Either string may be null or empty.
References m_joined_conditions, m_joined_conditions_obstack, and NULL.
|
inherited |
Try to find the definition of the given enum. Return null on failure.
References m_enum_types.
|
private |
Attempt to parse optional location information for insn INSN, as potentially written out by rtx_writer::print_rtx_operand_code_i. We look for a quoted string followed by a colon.
References add_fixup_source_location(), md_reader::get_current_location(), md_reader::read_char(), md_reader::read_name(), md_reader::read_quoted_string(), read_skip_spaces(), md_reader::require_char(), md_name::string, and md_reader::unread_char().
Referenced by read_rtx_operand_inL().
|
private |
Subroutine of function_reader::parse_edge. Parse a basic block index, handling "entry" and "exit".
References ENTRY_BLOCK, EXIT_BLOCK, md_reader::read_name(), and md_name::string.
Referenced by parse_edge().
|
private |
Parse zero or more child directives (edges and insns) within a "block" directive, having already parsed the "(block " heading. Consume the trailing ')'.
References alloc_block(), basic_block_info_for_fn, BB_END, BB_HEAD, BB_SET_PARTITION, BB_UNPARTITIONED, cfun, fatal_at(), basic_block_def::flags, md_reader::get_current_location(), basic_block_def::index, init_rtl_bb_info(), last_basic_block_for_fn, link_block(), m_bb_to_insert_after, m_highest_bb_idx, n_basic_blocks_for_fn, parse_edge(), parse_insn(), md_reader::read_name(), read_skip_spaces(), SET_BASIC_BLOCK_FOR_FN, set_block_for_insn(), md_name::string, and vec_safe_grow_cleared().
Referenced by parse_insn_chain().
|
private |
|
private |
Parse a "crtl" directive, having already parsed the "(crtl" heading at location LOC. Consume the final ")".
References crtl, error_at(), m_have_crtl_directive, parse_rtx(), md_reader::require_char_ws(), and md_reader::require_word_ws().
Referenced by parse_function().
|
private |
Parse an "edge-from" or "edge-to" directive within the "block" directive for BLOCK, having already parsed the "(edge" heading. Consume the final ")". Record the edge within m_deferred_edges. FROM is true for an "edge-from" directive, false for an "edge-to" directive.
References EXIT_BLOCK, gcc_assert, md_reader::get_current_location(), basic_block_def::index, m_deferred_edges, parse_bb_idx(), parse_edge_flags(), md_reader::read_quoted_string(), read_skip_spaces(), md_reader::require_char_ws(), md_reader::require_word_ws(), and md_reader::unread_char().
Referenced by parse_block().
|
private |
Read a name, looking for a match against a string found in array STRINGS of size NUM_VALUES. Return the index of the matched string, or emit an error.
References error(), i, md_reader::read_name(), and md_name::string.
Referenced by read_rtx_operand_inL().
|
private |
Parse the output of print_rtx_function (or hand-written data in the same format), having already parsed the "(function" heading, and finishing immediately before the final ")". The "param" and "crtl" clauses are optional.
References apply_fixups(), create_function(), crtl, fatal_with_file_and_line(), md_reader::get_current_location(), get_insns(), handle_insn_uids(), m_name, parse_crtl(), parse_insn_chain(), parse_param(), md_reader::read_name(), read_skip_spaces(), md_reader::read_string(), rebuild_jump_labels(), md_reader::require_char(), and md_reader::unread_char().
Referenced by handle_unknown_directive().
|
private |
Parse an rtx instruction, having parsed the opening and parenthesis, and name NAME, seen at START_LOC, by calling read_rtx_code, calling set_first_insn and set_last_insn as appropriate, and adding the insn to the insn chain. Consume the trailing ')'.
References dyn_cast(), fatal_at(), gcc_assert, get_last_insn(), m_first_insn, maybe_set_max_label_num(), NEXT_INSN(), NULL, rtx_reader::read_rtx_code(), md_reader::require_char_ws(), set_first_insn(), set_last_insn(), SET_NEXT_INSN(), and SET_PREV_INSN().
Referenced by parse_block(), and parse_insn_chain().
|
private |
Parse zero or more child insn elements within an "insn-chain" element. Consume the trailing ')'.
References create_edges(), fatal_at(), md_reader::get_current_location(), parse_block(), parse_insn(), md_reader::read_name(), and read_skip_spaces().
Referenced by parse_function().
tree function_reader::parse_mem_expr | ( | const char * | desc | ) |
Parse a tree dump for a MEM_EXPR in DESC and turn it back into a tree. We handle "<retval>" and param names within cfun, but for anything else we "cheat" by building a global VAR_DECL of type "int" with that name (returning the same global for a name if we see the same name more than once).
References build_decl(), cfun, DECL_NAME, DECL_RESULT, find_param_by_name(), FOR_EACH_VEC_ELT, get_identifier(), i, id_equal(), integer_type_node, m_fake_scope, and UNKNOWN_LOCATION.
Referenced by fixup_expr::apply().
|
private |
Parse the content of a "param" directive, having already parsed the "(param". Consume the trailing ')'.
References cfun, DECL_INCOMING_RTL, DECL_WRTL_CHECK, fatal_at(), find_param_by_name(), md_reader::get_current_location(), parse_rtx(), md_reader::read_quoted_string(), md_reader::require_char_ws(), and md_reader::require_word_ws().
Referenced by parse_function().
|
private |
Parse an rtx directive, including both the opening/closing parentheses, and the name.
References consolidate_singletons(), md_reader::read_name(), rtx_reader::read_rtx_code(), and md_reader::require_char_ws().
Referenced by parse_crtl(), and parse_param().
|
inherited |
Peek at the next character from the file without consuming it.
References read_char(), and unread_char().
Referenced by function_reader::handle_any_trailing_information(), and rtx_reader::read_nested_rtx().
Implementation of rtx_reader::postprocess for reading function dumps. Return the equivalent singleton rtx for X, if any, otherwise X.
Reimplemented from rtx_reader.
References consolidate_singletons().
|
inherited |
Special fprint_c_condition for writing to STDOUT.
References fprint_c_condition().
|
inherited |
Special fprint_md_ptr_loc for writing to STDOUT.
References fprint_md_ptr_loc().
|
inherited |
Read a braced string (a la Tcl) onto the string obstack. Caller has scanned the leading brace. Note that unlike quoted strings, the outermost braces _are_ included in the string constant.
References fatal_with_file_and_line(), get_lineno(), m_string_obstack, read_char(), and read_escape().
Referenced by read_string().
|
inherited |
Read the next character from the file.
References m_first_line, m_last_line, m_last_line_colno, m_read_md_colno, m_read_md_file, and m_read_md_lineno.
Referenced by function_reader::extra_parsing_for_operand_code_0(), function_reader::handle_any_trailing_information(), function_reader::maybe_read_location(), peek_char(), read_braced_string(), read_escape(), read_name_1(), read_name_or_nil(), read_quoted_string(), rtx_reader::read_rtx_code(), rtx_reader::read_until(), and require_char().
|
inherited |
|
inherited |
Subroutine of the string readers. Handles backslash escapes. Caller has read the backslash, but not placed it into the obstack.
References get_filename(), get_lineno(), m_string_obstack, and read_char().
Referenced by read_braced_string(), and read_quoted_string().
|
inherited |
Read FILENAME.
References fopen, handle_toplevel_file(), have_error, m_read_md_file, and m_read_md_filename.
Referenced by read_rtl_function_body().
|
inherited |
Read FILENAME, filtering to just the given lines.
References fopen, handle_toplevel_file(), have_error, m_first_line, m_last_line, m_read_md_file, and m_read_md_filename.
Referenced by read_rtl_function_body_from_file_range().
|
inherited |
References table.
Referenced by init_rtx_reader_args_cb(), and main().
|
inherited |
Read an rtx code name into NAME. It is terminated by any of the punctuation chars of rtx printed syntax.
References fatal_with_file_and_line(), and read_name_1().
Referenced by function_reader::extra_parsing_for_operand_code_0(), function_reader::handle_any_trailing_information(), handle_constants(), handle_enum(), handle_file(), function_reader::maybe_read_location(), function_reader::parse_bb_idx(), function_reader::parse_block(), function_reader::parse_enum_value(), function_reader::parse_function(), function_reader::parse_insn_chain(), function_reader::parse_rtx(), rtx_reader::read_nested_rtx(), rtx_reader::read_rtx_code(), function_reader::read_rtx_operand(), rtx_reader::read_rtx_operand(), function_reader::read_rtx_operand_inL(), function_reader::read_rtx_operand_r(), function_reader::read_rtx_operand_u(), read_skip_construct(), and require_word_ws().
|
privateinherited |
Read an rtx code name into NAME. It is terminated by any of the punctuation chars of rtx printed syntax.
References md_name::buffer, fatal_with_file_and_line(), get_current_location(), i, m_md_constants, md_constant::name, read_char(), read_skip_spaces(), md_name::string, and unread_char().
Referenced by read_name(), and read_name_or_nil().
|
inherited |
References md_name::buffer, get_current_location(), read_char(), read_name_1(), read_skip_construct(), and md_name::string.
|
inherited |
Read a nested rtx construct from the MD file and return it.
References NULL, NULL_RTX, md_reader::peek_char(), postprocess(), md_reader::read_name(), read_rtx_code(), md_reader::require_char_ws(), and md_name::string.
Referenced by read_rtx_operand(), and read_rtx_variadic().
|
inherited |
Read a double-quoted string onto the obstack. Caller has scanned the leading quote.
References m_string_obstack, read_char(), and read_escape().
Referenced by function_reader::maybe_read_location(), function_reader::parse_edge(), function_reader::parse_param(), and read_string().
References rtx_name.
Referenced by gen_reader::handle_unknown_directive().
|
inherited |
Subroutine of read_rtx and read_nested_rtx. CODE_NAME is the name of either an rtx code or a code iterator. Parse the rest of the rtx and return it.
References const_wide_int_alloc, CONST_WIDE_INT_P, CWI_ELT, fatal_with_file_and_line(), gcc_assert, GET_CODE, GET_RTX_FORMAT, handle_any_trailing_information(), HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT_PRINT, INSN_CHAIN_CODE_P, INSN_UID(), m_in_call_function_usage, m_reuse_rtx_by_id, modes, parse_reg_note_name(), PUT_CODE, PUT_MODE_RAW, md_reader::read_char(), read_flags(), md_reader::read_name(), read_rtx_operand(), read_rtx_variadic(), read_skip_spaces(), md_reader::record_potential_iterator_use(), rtx_alloc(), rtx_alloc_for_name(), RTX_CODE, RTX_CODE_SIZE, md_name::string, md_reader::unread_char(), and validate_const_wide_int().
Referenced by function_reader::parse_insn(), function_reader::parse_rtx(), and read_nested_rtx().
Parse operand IDX of X, returning X, or an equivalent rtx expression (for consolidating singletons). This is an overridden implementation of rtx_reader::read_rtx_operand for function_reader, handling various extra data printed by print_rtx, and sometimes calling the base class implementation.
Reimplemented from rtx_reader.
References CALL_P, extra_parsing_for_operand_code_0(), gcc_assert, GET_CODE, GET_RTX_FORMAT, md_reader::is_compact(), rtx_reader::m_in_call_function_usage, md_reader::read_name(), rtx_reader::read_rtx_operand(), read_rtx_operand_inL(), read_rtx_operand_r(), read_rtx_operand_u(), md_reader::require_char_ws(), and RTX_CODE.
|
private |
Parse operand IDX of X, of code 'i' or 'n' (as specified by FORMAT_CHAR). Special-cased handling of these, for reading function dumps.
References as_a(), gcc_checking_assert, GET_CODE, INSN_CODE, INSN_P, md_reader::is_compact(), maybe_read_location(), NOTE_P, parse_enum_value(), parse_note_insn_name(), md_reader::read_name(), md_name::string, and XINT.
Referenced by read_rtx_operand().
Parse the 'r' operand of X, returning X, or an equivalent rtx expression (for consolidating singletons). Special-cased handling of code 'r' for reading function dumps.
References add_fixup_expr(), consolidate_singletons(), fatal_at(), free(), md_reader::get_current_location(), lookup_reg_by_dump_name(), ORIGINAL_REGNO, md_reader::read_name(), read_skip_spaces(), rtx_reader::read_until(), md_reader::require_char_ws(), set_regno_raw(), startswith(), md_name::string, strip_trailing_whitespace(), and md_reader::unread_char().
Referenced by read_rtx_operand().
|
private |
Parse operand IDX of X, of code 'u', when reading function dumps. The RTL file recorded the ID of an insn (or 0 for NULL); we must store this as a pointer, but the insn might not have been loaded yet. Store the ID away for now, via a fixup.
References add_fixup_insn_uid(), GET_CODE, md_reader::is_compact(), md_reader::read_name(), and md_name::string.
Referenced by read_rtx_operand().
Mutually recursive subroutine of read_rtx which reads (thing x1 x2 x3 ...) and produces RTL as if (thing x1 (thing x2 (thing x3 ...))) had been written. When called, FORM is (thing x1 x2), and the file position is just past the leading parenthesis of x3. Only works for THINGs which are dyadic expressions, e.g. AND, IOR.
References GET_CODE, GET_MODE, PUT_MODE(), read_nested_rtx(), read_skip_spaces(), rtx_alloc(), md_reader::unread_char(), and XEXP.
Referenced by read_rtx_code().
|
inherited |
Skip the rest of a construct that started at line LINENO and that is currently nested by DEPTH levels of parentheses.
References error_at(), read_name(), read_skip_spaces(), read_string(), and unread_char().
Referenced by noop_reader::handle_unknown_directive(), and read_name_or_nil().
|
inherited |
Read some kind of string constant. This is the high-level routine used by read_rtx. It handles surrounding parentheses, leading star, and dispatch to the appropriate string constant reader.
References fatal_with_file_and_line(), get_current_location(), m_string_obstack, NULL, read_braced_string(), read_quoted_string(), read_skip_spaces(), require_char(), require_char_ws(), and set_md_ptr_loc().
Referenced by handle_enum(), handle_include(), function_reader::parse_function(), rtx_reader::read_rtx_operand(), and read_skip_construct().
|
inherited |
Consume characters until encountering a character in TERMINATOR_CHARS, consuming the terminator character if CONSUME_TERMINATOR is true. Return all characters before the terminator as an allocated buffer.
References md_reader::read_char(), read_skip_spaces(), and md_reader::unread_char().
Referenced by function_reader::handle_any_trailing_information(), and function_reader::read_rtx_operand_r().
|
inherited |
Interpret NAME as either a built-in value, iterator or attribute for group GROUP. X and INDEX are the values to pass to GROUP's apply_iterator callback. LOC is the location of the use.
References iterator_group::apply_iterator, iterator_group::find_builtin, iterator_group::iterators, m_string_obstack, record_attribute_use(), and record_iterator_use().
Referenced by rtx_reader::read_rtx_code(), and rtx_reader::read_rtx_operand().
|
inherited |
Consume the next character, issuing a fatal error if it is not EXPECTED.
References fatal_expected_char(), and read_char().
Referenced by function_reader::extra_parsing_for_operand_code_0(), function_reader::handle_any_trailing_information(), function_reader::maybe_read_location(), function_reader::parse_function(), and read_string().
|
inherited |
Consume any whitespace, then consume the next non-whitespace character, issuing a fatal error if it is not EXPECTED.
References fatal_expected_char(), and read_skip_spaces().
Referenced by function_reader::extra_parsing_for_operand_code_0(), function_reader::handle_any_trailing_information(), handle_constants(), handle_enum(), handle_file(), function_reader::parse_crtl(), function_reader::parse_edge(), function_reader::parse_insn(), function_reader::parse_param(), function_reader::parse_rtx(), rtx_reader::read_nested_rtx(), function_reader::read_rtx_operand(), rtx_reader::read_rtx_operand(), function_reader::read_rtx_operand_r(), and read_string().
|
inherited |
Consume any whitespace, then consume the next word (as per read_name), issuing a fatal error if it is not EXPECTED.
References fatal_with_file_and_line(), read_name(), and md_name::string.
Referenced by function_reader::parse_crtl(), function_reader::parse_edge(), and function_reader::parse_param().
|
inherited |
Allocate an rtx for code NAME. If NAME is a code iterator or an attribute, record its use for later and use one of its possible values as an interim rtx code.
References fatal_with_file_and_line(), md_reader::get_current_location(), md_reader::get_string_obstack(), modes, obstack, record_attribute_use(), record_iterator_use(), and rtx_alloc().
Referenced by read_rtx_code().
|
inherited |
Associate PTR with the file position given by FILE_LOC.
References md_reader::ptr_loc::loc, m_ptr_loc_obstack, m_ptr_locs, and md_reader::ptr_loc::ptr.
Referenced by copy_md_ptr_loc(), and read_string().
|
inherited |
For every enum definition, call CALLBACK with two arguments: a pointer to the constant definition and INFO. Stop when CALLBACK returns zero.
References m_enum_types.
Referenced by main().
|
inherited |
For every constant definition, call CALLBACK with two arguments: a pointer a pointer to the constant definition and INFO. Stop when CALLBACK returns zero.
References get_md_constants().
Referenced by main().
|
inherited |
Put back CH, which was the last character read from the file.
References m_last_line_colno, m_read_md_colno, m_read_md_file, and m_read_md_lineno.
Referenced by function_reader::extra_parsing_for_operand_code_0(), function_reader::handle_any_trailing_information(), handle_enum(), function_reader::maybe_read_location(), function_reader::parse_edge(), function_reader::parse_function(), peek_char(), read_name_1(), rtx_reader::read_rtx_code(), rtx_reader::read_rtx_operand(), function_reader::read_rtx_operand_r(), rtx_reader::read_rtx_variadic(), read_skip_construct(), and rtx_reader::read_until().
|
privateinherited |
Referenced by handle_include(), handle_toplevel_file(), md_reader(), and ~md_reader().
|
private |
Referenced by create_function(), function_reader(), and parse_block().
|
privateinherited |
Referenced by is_compact(), and md_reader().
|
private |
Referenced by create_edges(), and parse_edge().
|
privateinherited |
Referenced by handle_enum(), lookup_enum_type(), md_reader(), traverse_enum_types(), and ~md_reader().
Referenced by parse_mem_expr().
|
privateinherited |
Referenced by handle_include(), and md_reader().
|
private |
Referenced by function_reader(), and parse_insn().
|
privateinherited |
Referenced by md_reader(), read_char(), and read_file_fragment().
|
privateinherited |
Referenced by get_overloads(), and md_reader().
Referenced by add_fixup_expr(), add_fixup_insn_uid(), add_fixup_note_insn_basic_block(), apply_fixups(), and ~function_reader().
|
private |
Referenced by function_reader(), and parse_crtl().
|
private |
Referenced by function_reader(), and parse_block().
|
protectedinherited |
Referenced by read_rtx_code(), function_reader::read_rtx_operand(), and rtx_reader().
Referenced by get_insn_by_uid(), and handle_insn_uids().
|
privateinherited |
Referenced by fprint_c_condition(), join_c_conditions(), md_reader(), and ~md_reader().
|
privateinherited |
Referenced by join_c_conditions(), md_reader(), and ~md_reader().
|
privateinherited |
Referenced by add_include_path(), and md_reader().
|
privateinherited |
Referenced by md_reader(), read_char(), and read_file_fragment().
|
privateinherited |
Referenced by read_char(), and unread_char().
|
privateinherited |
Referenced by get_md_constants(), handle_constants(), md_reader(), read_name_1(), and ~md_reader().
|
private |
Referenced by create_function(), function_reader(), parse_function(), and ~function_reader().
|
privateinherited |
Referenced by md_reader().
|
privateinherited |
Referenced by md_reader().
|
privateinherited |
Referenced by md_reader(), set_md_ptr_loc(), and ~md_reader().
|
privateinherited |
Referenced by get_md_ptr_loc(), md_reader(), set_md_ptr_loc(), and ~md_reader().
|
privateinherited |
Referenced by get_colno(), get_current_location(), handle_file(), handle_include(), md_reader(), read_char(), and unread_char().
|
privateinherited |
Referenced by handle_file(), handle_include(), md_reader(), read_char(), read_file(), read_file_fragment(), and unread_char().
|
privateinherited |
Referenced by get_current_location(), get_filename(), handle_include(), handle_toplevel_file(), md_reader(), read_file(), and read_file_fragment().
|
privateinherited |
Referenced by get_current_location(), get_lineno(), handle_file(), handle_include(), md_reader(), read_char(), and unread_char().
Referenced by read_rtx_code().
|
privateinherited |
|
privateinherited |
Referenced by get_top_level_filename(), handle_toplevel_file(), and md_reader().