GCC Middle and Back End API Reference
|
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "target.h"
#include "tree.h"
#include "diagnostic.h"
#include "read-md.h"
#include "rtl.h"
#include "cfghooks.h"
#include "stringpool.h"
#include "function.h"
#include "tree-cfg.h"
#include "cfg.h"
#include "basic-block.h"
#include "cfgrtl.h"
#include "memmodel.h"
#include "emit-rtl.h"
#include "cgraph.h"
#include "tree-pass.h"
#include "toplev.h"
#include "varasm.h"
#include "read-rtl-function.h"
#include "selftest.h"
#include "selftest-rtl.h"
#include "regs.h"
#include "function-abi.h"
#include "cfg-flags.def"
Data Structures | |
class | deferred_edge |
class | function_reader |
struct | function_reader::uid_hash |
class | fixup |
class | operand_fixup |
class | fixup_insn_uid |
class | fixup_note_insn_basic_block |
class | fixup_expr |
Macros | |
#define | DEF_EDGE_FLAG(NAME, IDX) |
Functions | |
static const char * | get_operand_name (rtx insn, int operand_idx) |
static void | strip_trailing_whitespace (char *desc) |
static int | parse_note_insn_name (const char *string) |
static int | lookup_reg_by_dump_name (const char *name) |
static tree | find_param_by_name (tree fndecl, const char *name) |
static int | parse_edge_flag_token (const char *tok) |
static int | parse_edge_flags (char *str) |
static rtx | lookup_global_register (int regno) |
static void | ensure_regno (int regno) |
static rtx | consolidate_reg (rtx x) |
bool | read_rtl_function_body (const char *path) |
bool | read_rtl_function_body_from_file_range (location_t start_loc, location_t end_loc) |
Helper function for consolidate_singletons, for handling REG instances. Given REG instance X of some regno, return the singleton rtx for that regno, if it exists, or X.
References ensure_regno(), gcc_assert, GET_CODE, GET_MODE, ggc_alloc(), lookup_global_register(), NULL, REGNO, and regno_reg_rtx.
Referenced by function_reader::consolidate_singletons().
Ensure that the backend can cope with a REG with regno REGNO. Normally REG instances are created by gen_reg_rtx which updates regno_reg_rtx, growing it as necessary. The REG instances created from the dumpfile weren't created this way, so we need to manually update regno_reg_rtx.
References crtl, emit(), gcc_assert, ggc_alloc(), and reg_rtx_no.
Referenced by consolidate_reg().
Look within the params of FNDECL for a param named NAME. Return NULL_TREE if one isn't found.
References DECL_ARGUMENTS, DECL_NAME, id_equal(), NULL_TREE, and TREE_CHAIN.
Referenced by function_reader::parse_mem_expr(), and function_reader::parse_param().
Return a textual description of the operand of INSN with index OPERAND_IDX.
References gcc_assert, ggc_alloc(), and NULL.
Referenced by fixup_insn_uid::apply().
Helper function for consolidate_reg. Return the global rtx for the register with regno REGNO.
References arg_pointer_rtx, frame_pointer_rtx, ggc_alloc(), HARD_FRAME_POINTER_REGNUM, hard_frame_pointer_rtx, NULL, return_address_pointer_rtx, stack_pointer_rtx, VIRTUAL_CFA_REGNUM, virtual_cfa_rtx, VIRTUAL_INCOMING_ARGS_REGNUM, virtual_incoming_args_rtx, VIRTUAL_OUTGOING_ARGS_REGNUM, virtual_outgoing_args_rtx, VIRTUAL_PREFERRED_STACK_BOUNDARY_REGNUM, virtual_preferred_stack_boundary_rtx, VIRTUAL_STACK_DYNAMIC_REGNUM, virtual_stack_dynamic_rtx, VIRTUAL_STACK_VARS_REGNUM, and virtual_stack_vars_rtx.
Referenced by consolidate_reg().
Return the register number for NAME, or return -1 if it isn't recognized.
References ggc_alloc(), i, LAST_VIRTUAL_REGISTER, reg_names, VIRTUAL_CFA_REGNUM, VIRTUAL_INCOMING_ARGS_REGNUM, VIRTUAL_OUTGOING_ARGS_REGNUM, VIRTUAL_PREFERRED_STACK_BOUNDARY_REGNUM, VIRTUAL_STACK_DYNAMIC_REGNUM, and VIRTUAL_STACK_VARS_REGNUM.
Referenced by function_reader::read_rtx_operand_r().
Subroutine of parse_edge_flags. Parse TOK, a token such as "FALLTHRU", converting to the flag value. Issue an error if the token is unrecognized.
References error(), and ggc_alloc().
Referenced by parse_edge_flags().
Subroutine of function_reader::parse_edge. Parse STR and convert to a flag value (or issue an error). The parser uses strtok and hence modifiers STR in-place.
References ggc_alloc(), NULL, and parse_edge_flag_token().
Referenced by function_reader::parse_edge().
Return the numeric value n for GET_NOTE_INSN_NAME (n) for STRING, or fail if STRING isn't recognized.
References fatal_with_file_and_line(), GET_NOTE_INSN_NAME, ggc_alloc(), i, and NOTE_INSN_MAX.
Referenced by function_reader::read_rtx_operand_i_or_n().
Run the RTL dump parser, parsing a dump located at PATH. Return true iff the file was successfully parsed.
References crtl, default_function_abi, ggc_alloc(), init_emit(), init_varasm_status(), and initialize_rtl().
bool read_rtl_function_body_from_file_range | ( | location_t | start_loc, |
location_t | end_loc ) |
Run the RTL dump parser on the range of lines between START_LOC and END_LOC (including those lines).
References function_abi::base_abi(), cfun, crtl, error_at(), expand_location(), fndecl_abi(), ggc_alloc(), init_emit(), init_varasm_status(), and initialize_rtl().
Strip trailing whitespace from DESC.
References ggc_alloc().
Referenced by function_reader::read_rtx_operand_r().