GCC Middle and Back End API Reference
|
Go to the source code of this file.
Functions | |
void | expand_label (tree) |
bool | parse_output_constraint (const char **, int, int, int, bool *, bool *, bool *) |
bool | parse_input_constraint (const char **, int, int, int, int, const char *const *, bool *, bool *) |
tree | resolve_asm_operand_names (tree, tree, tree, tree) |
rtx_insn * | label_rtx (tree) |
rtx_insn * | force_label_rtx (tree) |
rtx_code_label * | jump_target_rtx (tree) |
void | expand_case (gswitch *) |
void | expand_sjlj_dispatch_table (rtx, vec< tree >) |
|
extern |
Expand a GIMPLE_SWITCH statement.
Terminate a case Ada or switch (C) statement in which ORIG_INDEX is the expression to be tested. If ORIG_TYPE is not NULL, it is the original ORIG_INDEX type as given in the source before any compiler conversions. Generate the code to test it and jump to the right place.
References bb_seq(), BITS_PER_WORD, CASE_HIGH, CASE_LABEL, CASE_LOW, cfun, count, do_pending_stack_adjust(), EDGE_COUNT, emit_case_dispatch_table(), error_mark_node, find_edge(), fold_build2, fold_convert, free_temp_slots(), gcc_assert, get_last_insn(), gimple_assign_rhs1(), gimple_assign_rhs_code(), gimple_bb(), gimple_seq_unreachable_p(), gimple_switch_default_label(), gimple_switch_index(), gimple_switch_label(), gimple_switch_num_labels(), i, int_fits_type_p(), INTEGRAL_TYPE_P, is_gimple_assign(), jump_target_rtx(), label_to_block(), NEXT_INSN(), NULL, NULL_TREE, remove_edge(), reorder_insns(), SSA_NAME_DEF_STMT, wi::to_wide(), TREE_CODE, tree_int_cst_lt(), TREE_OVERFLOW, TREE_TYPE, TYPE_PRECISION, and wide_int_to_tree().
Referenced by expand_gimple_stmt_1().
|
extern |
Declarations and data structures for stmt.cc. Copyright (C) 2013-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/>.
Handle goto statements and the labels that they can go to.
Specify the location in the RTL code of a label LABEL, which is a LABEL_DECL tree node. This is used for the kind of label that the user can jump to with a goto statement, and for alternatives of a switch or case statement. RTL labels generated for loops and conditionals don't go through here; they are generated directly at the RTL level, by other functions below. Note that this has nothing to do with defining label *names*. Languages vary in how they do that and what that even means.
References DECL_NAME, DECL_NONLOCAL, DECL_RTL, do_pending_stack_adjust(), emit_label(), expand_builtin_setjmp_receiver(), FORCED_LABEL, forced_labels, gen_rtx_INSN_LIST(), IDENTIFIER_POINTER, jump_target_rtx(), LABEL_NAME, maybe_set_first_label_num(), nonlocal_goto_handler_labels, NULL, and vec_safe_push().
Referenced by expand_gimple_stmt_1().
Like expand_case but special-case for SJLJ exception dispatching.
Expand the dispatch to a short decrement chain if there are few cases to dispatch to. Likewise if neither casesi nor tablejump is available, or if flag_jump_tables is set. Otherwise, expand as a casesi or a tablejump. The index mode is always the mode of integer_type_node. Trap if no case matches the index. DISPATCH_INDEX is the index expression to switch on. It should be a memory or register operand. DISPATCH_TABLE is a set of case labels. The set should be sorted in ascending order, be contiguous, starting with value 0, and contain only single-valued case labels.
References BLOCK_FOR_INSN(), build_int_cst(), CASE_HIGH, CASE_LABEL, CASE_LOW, CONST0_RTX, CONST1_RTX, copy_to_mode_reg(), do_jump_if_equal(), do_pending_stack_adjust(), emit_case_dispatch_table(), emit_label(), expand_builtin_trap(), force_expand_binop(), free_temp_slots(), gen_label_rtx(), get_last_insn(), i, integer_type_node, jump_target_rtx(), make_tree(), NEXT_INSN(), NULL, NULL_TREE, OPTAB_DIRECT, reorder_insns(), targetm, TYPE_MODE, and profile_probability::uninitialized().
Referenced by sjlj_emit_dispatch_table().
As label_rtx, but additionally the label is placed on the forced label list of its containing function (i.e. it is treated as reachable even if how is not obvious).
As above, but also put it on the forced-reference list of the function that contains it.
References decl_function_context(), forced_labels, gcc_assert, label_rtx(), and vec_safe_push().
Referenced by decode_addr_const().
|
extern |
As label_rtx, but checks that label was not deleted.
As label_rtx, but ensures (in check build), that returned value is an existing label (i.e. rtx with code CODE_LABEL).
References as_a(), and label_rtx().
Referenced by construct_init_block(), expand_case(), expand_goto(), expand_label(), expand_sjlj_dispatch_table(), label_rtx_for_bb(), and sjlj_emit_dispatch_table().
Return the CODE_LABEL rtx for a LABEL_DECL, creating it if necessary. If label was deleted, the corresponding note (NOTE_INSN_DELETED{_DEBUG,}_LABEL) insn will be returned.
Return the rtx-label that corresponds to a LABEL_DECL, creating it if necessary.
References as_a(), DECL_NONLOCAL, DECL_RTL, DECL_RTL_SET_P, FORCED_LABEL, gcc_assert, gen_label_rtx(), LABEL_PRESERVE_P, r, SET_DECL_RTL, and TREE_CODE.
Referenced by dump_eh_tree(), dw2_build_landing_pads(), emit_case_dispatch_table(), expand_asm_stmt(), expand_builtin(), expand_expr_real_1(), finish_eh_generation(), force_label_rtx(), jump_target_rtx(), mark_transaction_restart_calls(), rtl_make_eh_edge(), and sjlj_emit_dispatch_table().
|
extern |
Similar, but for input constraints.
References constraints, end(), error(), and warning().
Referenced by expand_asm_stmt(), find_func_aliases(), operands_scanner::get_asm_stmt_operands(), gimple_regimplify_operands(), gimplify_asm_expr(), walk_gimple_asm(), and walk_stmt_load_store_addr_ops().
|
extern |
Parse the output constraint pointed to by *CONSTRAINT_P. It is the OPERAND_NUMth output operand, indexed from zero. There are NINPUTS inputs and NOUTPUTS outputs to this extended-asm. Upon return, *ALLOWS_MEM will be TRUE iff the constraint allows the use of a memory operand. Similarly, *ALLOWS_REG will be TRUE iff the constraint allows the use of a register operand. And, *IS_INOUT will be true if the operand is read-write, i.e., if it is used as an input as well as an output. If *CONSTRAINT_P is not in canonical form, it will be made canonical. (Note that `+' will be replaced with `=' as part of this process.) Returns TRUE if all went well; FALSE if an error occurred.
References error(), ggc_alloc_string(), and warning().
Referenced by expand_asm_stmt(), find_func_aliases(), operands_scanner::get_asm_stmt_operands(), gimple_regimplify_operands(), gimplify_asm_expr(), walk_gimple_asm(), and walk_stmt_load_store_addr_ops().
Resolve the names of the operands in *POUTPUTS and *PINPUTS to numbers, and replace the name expansions in STRING and in the constraints to those numbers. This is generally done in the front end while creating the ASM_EXPR generic tree that eventually becomes the GIMPLE_ASM.
References build_string(), check_unique_operand_names(), free(), NULL, resolve_operand_name_1(), TREE_CHAIN, TREE_PURPOSE, TREE_STRING_POINTER, and TREE_VALUE.