GCC Middle and Back End API Reference
|
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "target.h"
#include "function.h"
#include "rtl.h"
#include "tree.h"
#include "tree-ssa-alias.h"
#include "gimple-expr.h"
#include "memmodel.h"
#include "backend.h"
#include "emit-rtl.h"
#include "df.h"
#include "tm_p.h"
#include "stringpool.h"
#include "tree-vrp.h"
#include "tree-ssanames.h"
#include "profile-count.h"
#include "optabs.h"
#include "regs.h"
#include "recog.h"
#include "diagnostic-core.h"
#include "fold-const.h"
#include "stor-layout.h"
#include "varasm.h"
#include "flags.h"
#include "explow.h"
#include "expmed.h"
#include "calls.h"
#include "expr.h"
#include "output.h"
#include "common/common-target.h"
#include "reload.h"
#include "intl.h"
#include "opts.h"
#include "gimplify.h"
#include "predict.h"
#include "real.h"
#include "langhooks.h"
#include "sbitmap.h"
#include "function-abi.h"
#include "attribs.h"
#include "asan.h"
#include "gimple.h"
#include "cfgloop.h"
#include "tree-vectorizer.h"
#include "options.h"
#include "case-cfn-macros.h"
#include "avoid-store-forwarding.h"
#include "gt-targhooks.h"
Macros | |
#define | PAD_VARARGS_DOWN BYTES_BIG_ENDIAN |
#define | HWASAN_SHIFT (GET_MODE_PRECISION (Pmode) - 8) |
#define | HWASAN_SHIFT_RTX GEN_INT (HWASAN_SHIFT) |
Variables | |
static tree | stack_chk_guard_decl |
static tree | stack_chk_fail_decl |
#define HWASAN_SHIFT (GET_MODE_PRECISION (Pmode) - 8) |
How many bits to shift in order to access the tag bits. The default is to store the tag in the top 8 bits of a 64 bit pointer, hence shifting 56 bits will leave just the tag.
Referenced by default_memtag_add_tag(), and default_memtag_untagged_pointer().
#define HWASAN_SHIFT_RTX GEN_INT (HWASAN_SHIFT) |
Referenced by default_memtag_extract_tag(), and default_memtag_set_tag().
#define PAD_VARARGS_DOWN BYTES_BIG_ENDIAN |
Referenced by std_gimplify_va_arg_expr().
bool bsd_libc_has_function | ( | enum function_class | fn_class, |
tree | type ) |
Assume some c99 functions are present at the runtime including sincos.
References function_c94, function_c99_misc, and function_sincos.
Build an indirect-ref expression over the given TREE, which represents a piece of a va_arg() expansion.
References build_simple_mem_ref_loc(), and EXPR_LOCATION.
Referenced by std_gimplify_va_arg_expr().
bool can_use_doloop_if_innermost | ( | const widest_int & | , |
const widest_int & | , | ||
unsigned int | loop_depth, | ||
bool | ) |
An implementation of TARGET_CAN_USE_DOLOOP_P for targets that do not support nested low-overhead loops.
References loop_depth().
HOST_WIDE_INT constant_alignment_word_strings | ( | const_tree | exp, |
HOST_WIDE_INT | align ) |
An implementation of TARGET_CONSTANT_ALIGNMENT that aligns strings to at least BITS_PER_WORD but otherwise makes no changes.
References BITS_PER_WORD, exp(), MAX, and TREE_CODE.
scalar_int_mode default_addr_space_address_mode | ( | addr_space_t | addrspace | ) |
Return the mode for an address in a given ADDRSPACE, defaulting to Pmode for all address spaces.
Referenced by target_default_pointer_address_modes_p().
The default hook for TARGET_ADDR_SPACE_CONVERT. This hook should never be called for targets with only a generic address space.
References gcc_unreachable.
int default_addr_space_debug | ( | addr_space_t | as | ) |
The default hook for debugging the address space is to return the address space number to indicate DW_AT_address_class.
void default_addr_space_diagnose_usage | ( | addr_space_t | , |
location_t | ) |
The default hook implementation for TARGET_ADDR_SPACE_DIAGNOSE_USAGE. Don't complain about any address space.
bool default_addr_space_legitimate_address_p | ( | machine_mode | mode, |
rtx | mem, | ||
bool | strict, | ||
addr_space_t | as, | ||
code_helper | code ) |
Named address space version of legitimate_address_p. By default, all address spaces have the same form.
References targetm.
rtx default_addr_space_legitimize_address | ( | rtx | x, |
rtx | oldx, | ||
machine_mode | mode, | ||
addr_space_t | as ) |
Named address space version of LEGITIMIZE_ADDRESS. By default, all address spaces have the same form.
References targetm.
scalar_int_mode default_addr_space_pointer_mode | ( | addr_space_t | addrspace | ) |
Return the mode for a pointer to a given ADDRSPACE, defaulting to ptr_mode for all address spaces.
References ptr_mode.
Referenced by target_default_pointer_address_modes_p().
bool default_addr_space_subset_p | ( | addr_space_t | subset, |
addr_space_t | superset ) |
The default hook for determining if one named address space is a subset of another and to return which address space to use as the common address space.
bool default_addr_space_valid_pointer_mode | ( | scalar_int_mode | mode, |
addr_space_t | as ) |
Named address space version of valid_pointer_mode. To match the above, the same modes apply to all address spaces.
References targetm.
bool default_addr_space_zero_address_valid | ( | addr_space_t | as | ) |
The default hook for determining if 0 within a named address space is a valid address.
void default_asm_out_constructor | ( | rtx | symbol, |
int | priority ) |
Record an element in the table of global constructors. SYMBOL is a SYMBOL_REF of the function to be called; PRIORITY is a number between 0 and MAX_INIT_PRIORITY.
References sorry().
void default_asm_out_destructor | ( | rtx | symbol, |
int | priority ) |
Likewise for global destructors.
References sorry().
Default implementation of TARGET_ATOMIC_ASSIGN_EXPAND_FENV.
unsigned int default_autovectorize_vector_modes | ( | vector_modes * | , |
bool | ) |
By default only the preferred vector mode is tried.
bool default_avoid_store_forwarding_p | ( | vec< store_fwd_info > | , |
rtx | , | ||
int | total_cost, | ||
bool | ) |
The default implementation of TARGET_AVOID_STORE_FORWARDING_P.
References COSTS_N_INSNS, and dump_file.
bool default_bitint_type_info | ( | int | , |
struct bitint_info * | ) |
Return true if _BitInt(N) is supported and fill details about it into *INFO.
Mapping of target builtin functions to vectorized variants.
References NULL_TREE.
rtx default_builtin_setjmp_frame_value | ( | void | ) |
The default implementation of TARGET_BUILTIN_SETJMP_FRAME_VALUE.
References virtual_stack_vars_rtx.
bool default_builtin_support_vector_misalignment | ( | machine_mode | mode, |
const_tree | type, | ||
int | misalignment, | ||
bool | is_packed ) |
By default, assume that a target supports any factor of misalignment memory access if it supports movmisalign patten. is_packed is true if the memory access is defined in a packed struct.
References optab_handler().
bool default_builtin_vector_alignment_reachable | ( | const_tree | , |
bool | is_packed ) |
By default assume vectors of element TYPE require a multiple of the natural alignment of TYPE. TYPE is naturally aligned if IS_PACKED is false.
int default_builtin_vectorization_cost | ( | enum vect_cost_for_stmt | type_of_cost, |
tree | vectype, | ||
int | misalign ) |
Default vectorizer cost model values.
References cond_branch_not_taken, cond_branch_taken, estimated_poly_value(), gcc_unreachable, scalar_load, scalar_stmt, scalar_store, scalar_to_vec, TYPE_VECTOR_SUBPARTS(), unaligned_load, unaligned_store, vec_construct, vec_perm, vec_promote_demote, vec_to_scalar, vector_load, vector_stmt, and vector_store.
Mapping of builtin functions to vectorized variants.
References NULL_TREE.
Default version of canonicalize_comparison.
unsigned int default_case_values_threshold | ( | void | ) |
If the machine does not have a case insn that compares the bounds, this means extra overhead for dispatch tables, which raises the threshold for using them.
References targetm.
machine_mode default_cc_modes_compatible | ( | machine_mode | m1, |
machine_mode | m2 ) |
bool default_class_likely_spilled_p | ( | reg_class_t | rclass | ) |
The default implementation of TARGET_CLASS_LIKELY_SPILLED_P.
References reg_class_size.
unsigned char default_class_max_nregs | ( | reg_class_t | rclass, |
machine_mode | mode ) |
The default implementation of TARGET_CLASS_MAX_NREGS.
References GET_MODE_SIZE(), MACRO_MODE, and poly_int< N, C >::to_constant().
int default_compare_by_pieces_branch_ratio | ( | machine_mode | ) |
This hook controls code generation for expanding a memcmp operation by pieces. Return 1 for the normal pattern of compare/jump after each pair of loads, or a higher number to reduce the number of branches.
bool default_conditional_operation_is_expensive | ( | unsigned | ifn | ) |
By default consider masked stores to be expensive.
HOST_WIDE_INT default_constant_alignment | ( | const_tree | , |
HOST_WIDE_INT | align ) |
The default implementation of TARGET_CONSTANT_ALIGNMENT.
scalar_int_mode default_cstore_mode | ( | enum insn_code | icode | ) |
Returns modified FUNCTION_TYPE for cdtor callabi.
Returns the size of the cookie to use when allocating an array whose elements have the indicated TYPE. Assumes that it is already known that a cookie is needed.
References size_in_bytes(), size_int, sizetype, tree_int_cst_lt(), and TYPE_ALIGN_UNIT.
tree default_cxx_guard_type | ( | void | ) |
The generic C++ ABI specifies this is a 64-bit value.
References long_long_integer_type_node.
enum unwind_info_type default_debug_unwind_info | ( | void | ) |
Determine the debugging unwind mechanism for the target.
References dwarf_debuginfo_p(), UI_DWARF2, and UI_NONE.
bool default_decimal_float_supported_p | ( | void | ) |
True if the target supports decimal floating point.
|
extern |
machine_mode default_dwarf_frame_reg_mode | ( | int | regno | ) |
Determine the correct mode for a Dwarf frame register that represents register REGNO.
References choose_hard_reg_mode(), eh_edge_abi, reg_raw_mode, and targetm.
unsigned int default_dwarf_poly_indeterminate_value | ( | unsigned int | , |
unsigned int * | , | ||
int * | ) |
Targets that set NUM_POLY_INT_COEFFS to something greater than 1 must define this hook.
References gcc_unreachable.
scalar_int_mode default_eh_return_filter_mode | ( | void | ) |
References targetm.
void default_emit_support_tinfos | ( | emit_support_tinfos_callback | ) |
bool default_empty_mask_is_expensive | ( | unsigned | ifn | ) |
By default consider masked stores to be expensive.
HOST_WIDE_INT default_estimated_poly_value | ( | poly_int64 | x, |
poly_value_estimate_kind | ) |
The default implementation of TARGET_ESTIMATED_POLY_VALUE.
References poly_int< N, C >::coeffs.
enum flt_eval_method default_excess_precision | ( | enum | excess_precision_type | ) |
Default implementation of TARGET_C_EXCESS_PRECISION.
References FLT_EVAL_METHOD_PROMOTE_TO_FLOAT.
rtx default_expand_builtin_saveregs | ( | void | ) |
References const0_rtx, and error().
void default_external_libcall | ( | rtx | fun | ) |
References asm_out_file.
tree default_external_stack_protect_fail | ( | void | ) |
References build_call_expr(), build_decl(), build_function_type_list(), DECL_ARTIFICIAL, DECL_EXTERNAL, DECL_IGNORED_P, DECL_VISIBILITY, DECL_VISIBILITY_SPECIFIED, get_identifier(), NULL_TREE, stack_chk_fail_decl, TREE_NOTHROW, TREE_PUBLIC, TREE_STATIC, TREE_THIS_VOLATILE, TREE_USED, UNKNOWN_LOCATION, VISIBILITY_DEFAULT, and void_type_node.
Referenced by default_hidden_stack_protect_fail().
bool default_fixed_point_supported_p | ( | void | ) |
True if the target supports fixed-point arithmetic.
bool default_float_exceptions_rounding_supported_p | ( | void | ) |
True if the target supports floating-point exceptions and rounding modes.
bool default_floatn_builtin_p | ( | int | func | ) |
Define this to return true if the _Floatn and _Floatnx built-in functions should implicitly enable the built-in function without the __builtin_ prefix in addition to the normal built-in function with the __builtin_ prefix. The default is to only enable built-in functions without the __builtin_ prefix for the GNU C langauge. The argument FUNC is the enum builtin_in_function id of the function to be enabled.
References lang_GNU_C(), and lang_GNU_OBJC().
opt_scalar_float_mode default_floatn_mode | ( | int | n, |
bool | extended ) |
Return the machine mode to use for the type _FloatN, if EXTENDED is false, or _FloatNx, if EXTENDED is true, or VOIDmode if not supported.
References opt_mode< T >::exists(), gcc_unreachable, REAL_MODE_FORMAT, and targetm.
unsigned default_fortify_source_default_level | ( | void | ) |
By default, -fhardened will add -D_FORTIFY_SOURCE=2.
rtx default_function_arg | ( | cumulative_args_t | , |
const function_arg_info & | ) |
References gcc_unreachable.
void default_function_arg_advance | ( | cumulative_args_t | , |
const function_arg_info & | ) |
References gcc_unreachable.
unsigned int default_function_arg_boundary | ( | machine_mode | mode, |
const_tree | type ) |
HOST_WIDE_INT default_function_arg_offset | ( | machine_mode | , |
const_tree | ) |
Default implementation of TARGET_FUNCTION_ARG_OFFSET.
pad_direction default_function_arg_padding | ( | machine_mode | mode, |
const_tree | type ) |
Default implementation of TARGET_FUNCTION_ARG_PADDING: usually pad upward, but pad short args downward on big-endian machines.
References GET_MODE_SIZE(), int_size_in_bytes(), PAD_DOWNWARD, PAD_UPWARD, poly_int< N, C >::to_constant(), TREE_CODE, and TYPE_SIZE.
unsigned int default_function_arg_round_boundary | ( | machine_mode | mode, |
const_tree | type ) |
rtx default_function_incoming_arg | ( | cumulative_args_t | , |
const function_arg_info & | ) |
References gcc_unreachable.
rtx default_function_value | ( | const_tree | ret_type, |
const_tree | fn_decl_or_type, | ||
bool | outgoing ) |
References DECL_P, gcc_unreachable, and NULL.
bool default_function_value_regno_p | ( | const unsigned int | regno | ) |
The default hook for TARGET_FUNCTION_VALUE_REGNO_P.
References gcc_unreachable.
bool default_generate_pic_addr_diff_vec | ( | void | ) |
By default, address diff vectors are generated for jump tables when flag_pic is true.
opt_machine_mode default_get_mask_mode | ( | machine_mode | mode | ) |
By default a vector of integers is used as a mask.
References related_int_vector_mode().
void * default_get_pch_validity | ( | size_t * | sz | ) |
Default version of get_pch_validity. By default, every flag difference is fatal; that will be mostly right for most targets, but completely right for very few.
References cl_options_count, i, option_affects_pch_p(), r, target_flags, and targetm.
fixed_size_mode default_get_reg_raw_mode | ( | int | regno | ) |
To be used by targets where reg_raw_mode doesn't return the right mode for registers used in apply_builtin_return and apply_builtin_arg.
References as_a(), and reg_raw_mode.
unsigned int default_hard_regno_nregs | ( | unsigned int | , |
machine_mode | mode ) |
The defualt implementation of TARGET_HARD_REGNO_NREGS.
References CEIL, and GET_MODE_SIZE().
bool default_hard_regno_scratch_ok | ( | unsigned int | regno | ) |
bool default_has_ifunc_p | ( | void | ) |
True if the target supports GNU indirect functions.
bool default_have_conditional_execution | ( | void | ) |
Default implementation of TARGET_HAVE_SPECULATION_SAFE_VALUE.
tree default_hidden_stack_protect_fail | ( | void | ) |
References build_call_expr(), build_decl(), build_function_type_list(), DECL_ARTIFICIAL, DECL_EXTERNAL, DECL_IGNORED_P, DECL_VISIBILITY, DECL_VISIBILITY_SPECIFIED, default_external_stack_protect_fail(), get_identifier(), NULL_TREE, stack_chk_fail_decl, TREE_NOTHROW, TREE_PUBLIC, TREE_STATIC, TREE_THIS_VOLATILE, TREE_USED, UNKNOWN_LOCATION, VISIBILITY_HIDDEN, and void_type_node.
rtx default_internal_arg_pointer | ( | void | ) |
References copy_to_reg(), fixed_regs, and virtual_incoming_args_rtx.
const char * default_invalid_within_doloop | ( | const rtx_insn * | insn | ) |
NULL if INSN insn is valid within a low-overhead loop, otherwise returns an error message. This function checks whether a given INSN is valid within a low-overhead loop. If INSN is invalid it returns the reason for that, otherwise it returns NULL. A called function may clobber any special registers required for low-overhead looping. Additionally, some targets (eg, PPC) use the count register for branch on table instructions. We reject the doloop pattern in these cases.
References CALL_P, computed_jump_p(), NULL, and tablejump_p().
reg_class_t default_ira_change_pseudo_allocno_class | ( | int | regno, |
reg_class_t | cl, | ||
reg_class_t | best_cl ) |
bool default_keep_leaf_when_profiled | ( | ) |
Return true if a leaf function should stay leaf even with profiling enabled.
bool default_legitimate_address_p | ( | machine_mode | mode, |
rtx | addr, | ||
bool | strict, | ||
code_helper | ) |
Default target hook functions. Copyright (C) 2003-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/>.
The migration of target macros to target hooks works as follows: 1. Create a target hook that uses the existing target macros to implement the same functionality. 2. Convert all the MI files to use the hook instead of the macro. 3. Repeat for a majority of the remaining target macros. This will take some time. 4. Tell target maintainers to start migrating. 5. Eventually convert the backends to override the hook instead of defining the macros. This will take some time too. 6. TBD when, poison the macros. Unmigrated targets will break at this point. Note that we expect steps 1-3 to be done by the people that understand what the MI does with each macro, and step 5 to be done by the target maintainers for their respective targets. Note that steps 1 and 2 don't have to be done together, but no target can override the new hook until step 2 is complete for it. Once the macros are poisoned, we will revert to the old migration rules - migrate the macro, callers, and targets all at once. This comment can thus be removed at that point.
References gcc_unreachable, memory_address_p, and strict_memory_address_p.
bool default_legitimize_address_displacement | ( | rtx * | , |
rtx * | , | ||
poly_int64 | , | ||
machine_mode | ) |
bool default_libc_has_fast_function | ( | int | fcode | ) |
By default assume that libc has not a fast implementation.
bool default_libc_has_function | ( | enum function_class | fn_class, |
tree | type ) |
By default we assume that c99 functions are present at the runtime, but sincos is not.
References function_c94, function_c99_math_complex, and function_c99_misc.
References gcc_unreachable, and MACRO_MODE.
scalar_int_mode default_libgcc_cmp_return_mode | ( | void | ) |
References word_mode.
bool default_libgcc_floating_mode_supported_p | ( | scalar_float_mode | mode | ) |
Return true if libgcc supports floating-point mode MODE (known to be supported as a scalar mode).
scalar_int_mode default_libgcc_shift_count_mode | ( | void | ) |
References word_mode.
unsigned default_libm_function_max_error | ( | unsigned | , |
machine_mode | , | ||
bool | ) |
Referenced by glibc_linux_libm_function_max_error().
|
extern |
tree default_mangle_assembler_name | ( | const char * | name | ) |
The default implementation of TARGET_MANGLE_ASSEMBLER_NAME.
References get_identifier(), NULL, targetm, and user_label_prefix.
unsigned int default_max_noce_ifcvt_seq_cost | ( | edge | e | ) |
Default implementation of TARGET_MAX_NOCE_IFCVT_SEQ_COST.
References COSTS_N_INSNS, OPTION_SET_P, and predictable_edge_p().
bool default_member_type_forces_blk | ( | const_tree | , |
machine_mode | ) |
Default version of member_type_forces_blk.
int default_memory_move_cost | ( | machine_mode | mode, |
reg_class_t | rclass, | ||
bool | in ) |
Compute cost of moving registers to/from memory.
References MACRO_MODE, and memory_move_secondary_cost().
rtx default_memtag_add_tag | ( | rtx | base, |
poly_int64 | offset, | ||
uint8_t | tag_offset ) |
The default implementation of TARGET_MEMTAG_ADD_TAG.
References HWASAN_SHIFT, offset, and plus_constant().
bool default_memtag_can_tag_addresses | ( | ) |
The default implementation of TARGET_MEMTAG_EXTRACT_TAG.
References expand_simple_binop(), gcc_assert, gen_lowpart, HWASAN_SHIFT_RTX, and OPTAB_DIRECT.
uint8_t default_memtag_granule_size | ( | ) |
The default implementation of TARGET_MEMTAG_INSERT_RANDOM_TAG.
References emit_library_call_value(), gcc_assert, init_one_libfunc(), LCT_NORMAL, NULL_RTX, and targetm.
The default implementation of TARGET_MEMTAG_SET_TAG.
References expand_simple_binop(), gcc_assert, GET_MODE, HWASAN_SHIFT_RTX, NULL_RTX, OPTAB_DIRECT, and OPTAB_WIDEN.
uint8_t default_memtag_tag_size | ( | ) |
The default implementation of TARGET_MEMTAG_UNTAGGED_POINTER.
References expand_simple_binop(), gcc_assert, gen_int_mode(), HOST_WIDE_INT_1U, HWASAN_SHIFT, and OPTAB_DIRECT.
unsigned int default_min_arithmetic_precision | ( | void | ) |
Default implementation of TARGET_MIN_ARITHMETIC_PRECISION.
References BITS_PER_WORD, and WORD_REGISTER_OPERATIONS.
unsigned int default_min_divisions_for_recip_mul | ( | machine_mode | mode | ) |
The default implementation of TARGET_MIN_DIVISIONS_FOR_RECIP_MUL.
References have_insn_for().
bool default_mode_dependent_address_p | ( | const_rtx | addr, |
addr_space_t | addrspace ) |
The default implementation of TARGET_MODE_DEPENDENT_ADDRESS_P.
machine_mode default_mode_for_floating_type | ( | enum tree_index | ti | ) |
Return machine mode for a floating type which is indicated by the given enum tree_index.
References gcc_assert, TI_DOUBLE_TYPE, TI_FLOAT_TYPE, and TI_LONG_DOUBLE_TYPE.
machine_mode default_mode_for_suffix | ( | char | suffix | ) |
Return machine mode for non-standard suffix or VOIDmode if non-standard suffixes are unsupported.
int default_mode_rep_extended | ( | scalar_int_mode | , |
scalar_int_mode | ) |
The default implementation of TARGET_MODE_REP_EXTENDED.
bool default_need_ipa_fn_target_info | ( | const_tree | , |
unsigned int & | ) |
By default, return false to not need to collect any target information for inlining. Target maintainer should re-define the hook if the target want to take advantage of it.
The default implementation of TARGET_NEW_ADDRESS_PROFITABLE_P.
bool default_optab_supported_p | ( | int | , |
machine_mode | , | ||
machine_mode | , | ||
optimization_type | ) |
Default implementation of TARGET_OPTAB_SUPPORTED_P.
const char * default_pch_valid_p | ( | const void * | data_p, |
size_t | len ) |
Default version of pch_valid_p.
References _, cl_options, cl_options_count, i, NULL, option_affects_pch_p(), pch_option_mismatch(), r, target_flags, and targetm.
Return true if we predict the loop LOOP will be transformed to a low-overhead loop, otherwise return false. By default, false is returned, as this hook's applicability should be verified for each target. Target maintainers should re-define the hook if the target can take advantage of it.
bool default_preferred_div_as_shifts_over_mult | ( | const_tree | type | ) |
The default implementation of TARGET_VECTORIZE_PREFERRED_DIV_AS_SHIFTS_OVER_MULT.
References can_mult_highpart_p(), TYPE_MODE, and TYPE_UNSIGNED.
machine_mode default_preferred_doloop_mode | ( | machine_mode | mode | ) |
By default, just use the input MODE itself.
The default implementation of TARGET_PREFERRED_ELSE_VALUE.
References build_zero_cst().
reg_class_t default_preferred_output_reload_class | ( | rtx | x, |
reg_class_t | rclass ) |
The default implementation of TARGET_OUTPUT_PREFERRED_RELOAD_CLASS.
reg_class_t default_preferred_reload_class | ( | rtx | x, |
reg_class_t | rclass ) |
The default implementation of TARGET_PREFERRED_RELOAD_CLASS.
reg_class_t default_preferred_rename_class | ( | reg_class_t | rclass | ) |
The default implementation of TARGET_PREFERRED_RENAME_CLASS.
machine_mode default_preferred_simd_mode | ( | scalar_mode | mode | ) |
By default, only attempt to parallelize bitwise operations, and possibly adds/subtracts using bit-twiddling.
References word_mode.
poly_uint64 default_preferred_vector_alignment | ( | const_tree | type | ) |
The default implementation of TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT.
References TYPE_ALIGN.
bool default_pretend_outgoing_varargs_named | ( | cumulative_args_t | ca | ) |
References default_setup_incoming_varargs(), and targetm.
void default_print_operand | ( | FILE * | stream, |
rtx | x, | ||
int | code ) |
Emit to STREAM the assembler syntax for insn operand X.
References gcc_unreachable.
void default_print_operand_address | ( | FILE * | stream, |
machine_mode | , | ||
rtx | x ) |
Emit to STREAM the assembler syntax for an insn operand whose memory address is X.
References gcc_unreachable.
bool default_print_operand_punct_valid_p | ( | unsigned char | code | ) |
Return true if CODE is a valid punctuation character for the `print_operand' hook.
void default_print_patchable_function_entry | ( | FILE * | file, |
unsigned HOST_WIDE_INT | patch_area_size, | ||
bool | record_p ) |
Write PATCH_AREA_SIZE NOPs into the asm outfile FILE around a function entry. If RECORD_P is true and the target supports named sections, the location of the NOPs will be recorded in a special object section called "__patchable_function_entries". This routine may be called twice per function to put NOPs before and after the function entry.
References ASM_OUTPUT_LABEL, assemble_align(), assemble_name_raw(), current_function_decl, current_function_funcdef_no, DECL_COMDAT_GROUP, fputc(), gcc_assert, get_insn_template(), get_section(), i, in_section, integer_asm_op(), make_insn_raw(), NULL, output_asm_insn(), POINTER_SIZE, POINTER_SIZE_UNITS, recog_memoized(), SECTION_LINK_ORDER, SECTION_RELRO, SECTION_WRITE, switch_to_comdat_section(), and switch_to_section().
bool default_profile_before_prologue | ( | void | ) |
machine_mode default_promote_function_mode | ( | const_tree | type, |
machine_mode | mode, | ||
int * | punsignedp, | ||
const_tree | funtype, | ||
int | for_return ) |
References NULL_TREE, and promote_mode().
machine_mode default_promote_function_mode_always_promote | ( | const_tree | type, |
machine_mode | mode, | ||
int * | punsignedp, | ||
const_tree | funtype, | ||
int | for_return ) |
References promote_mode().
bool default_push_argument | ( | unsigned int | ) |
Default implementation of TARGET_PUSH_ARGUMENT.
References ACCUMULATE_OUTGOING_ARGS.
Determine whether the memory reference specified by REF may alias the C libraries errno location.
References pt_solution::anything, ao_ref_base(), DECL_EXTERNAL, DECL_P, integer_type_node, pt_solution::nonlocal, ptr_info_def::pt, SSA_NAME_PTR_INFO, TREE_CODE, TREE_OPERAND, TREE_STATIC, TREE_TYPE, TYPE_MODE, and TYPE_UNSIGNED.
int default_register_move_cost | ( | machine_mode | mode, |
reg_class_t | from, | ||
reg_class_t | to ) |
Compute cost of moving data from a register of class FROM to one of TO, using MODE.
References MACRO_MODE.
int default_register_priority | ( | int | hard_regno | ) |
|
extern |
int default_reloc_rw_mask | ( | void | ) |
By default, if flag_pic is true, then neither local nor global relocs should be placed in readonly memory.
bool default_return_in_memory | ( | const_tree | type, |
const_tree | fntype ) |
References TYPE_MODE.
poly_int64 default_return_pops_args | ( | tree | , |
tree | , | ||
poly_int64 | ) |
bool default_scalar_mode_supported_p | ( | scalar_mode | mode | ) |
True if MODE is valid for the target. By "valid", we mean able to be manipulated in non-trivial ways. In particular, this means all the arithmetic is supported. By default we guess this means that any C type is supported. If we can't map the mode back to a type that would be available in C, then reject it. Special case, here, is the double-word arithmetic supported by optabs.cc.
References BITS_PER_WORD, CHAR_TYPE_SIZE, gcc_unreachable, GET_MODE_CLASS, GET_MODE_PRECISION(), INT_TYPE_SIZE, LONG_LONG_TYPE_SIZE, LONG_TYPE_SIZE, SHORT_TYPE_SIZE, targetm, TI_DOUBLE_TYPE, TI_FLOAT_TYPE, and TI_LONG_DOUBLE_TYPE.
machine_mode default_secondary_memory_needed_mode | ( | machine_mode | mode | ) |
The default implementation of TARGET_SECONDARY_MEMORY_NEEDED_MODE.
References BITS_PER_WORD, GET_MODE_BITSIZE(), GET_MODE_CLASS, INTEGRAL_MODE_P, known_lt, mode_for_size(), opt_mode< T >::require(), and targetm.
reg_class_t default_secondary_reload | ( | bool | in_p, |
rtx | x, | ||
reg_class_t | reload_class_i, | ||
machine_mode | reload_mode, | ||
secondary_reload_info * | sri ) |
void default_select_early_remat_modes | ( | sbitmap | ) |
The default implementation of TARGET_EARLY_REMAT_MODES.
void default_setup_incoming_varargs | ( | cumulative_args_t | , |
const function_arg_info & | , | ||
int * | , | ||
int | ) |
Referenced by default_pretend_outgoing_varargs_named().
unsigned HOST_WIDE_INT default_shift_truncation_mask | ( | machine_mode | mode | ) |
The default implementation of TARGET_SHIFT_TRUNCATION_MASK.
References GET_MODE_UNIT_BITSIZE, and SHIFT_COUNT_TRUNCATED.
bool default_slow_unaligned_access | ( | machine_mode | , |
unsigned int | ) |
The default implementation of TARGET_SLOW_UNALIGNED_ACCESS.
Default implementation of the speculation-safe-load builtin. This implementation simply copies val to result and generates a speculation_barrier insn, if such a pattern is defined.
References emit_insn(), and emit_move_insn().
machine_mode default_split_reduction | ( | machine_mode | mode | ) |
By default do not split reductions further.
HOST_WIDE_INT default_stack_clash_protection_alloca_probe_range | ( | void | ) |
Default implementation for TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE.
tree default_stack_protect_guard | ( | void | ) |
rtx default_static_chain | ( | const_tree | ARG_UNUSEDfndecl_or_type, |
bool | incoming_p ) |
References gen_rtx_MEM(), gen_rtx_REG(), sorry(), and stack_pointer_rtx.
HOST_WIDE_INT default_static_rtx_alignment | ( | machine_mode | mode | ) |
The default implementation of TARGET_STATIC_RTX_ALIGNMENT.
References GET_MODE_ALIGNMENT.
References DECL_FUNCTION_SPECIFIC_TARGET, and target_option_default_node.
References warning().
bool default_target_option_valid_attribute_p | ( | tree | ARG_UNUSEDfndecl, |
tree | ARG_UNUSEDname, | ||
tree | ARG_UNUSEDargs, | ||
int | ARG_UNUSEDflags ) |
References warning().
bool default_target_option_valid_version_attribute_p | ( | tree | ARG_UNUSEDfndecl, |
tree | ARG_UNUSEDname, | ||
tree | ARG_UNUSEDargs, | ||
int | ARG_UNUSEDflags ) |
References warning().
void default_trampoline_init | ( | rtx | ARG_UNUSEDm_tramp, |
tree | ARG_UNUSEDt_func, | ||
rtx | ARG_UNUSEDr_chain ) |
References sorry().
machine_mode default_translate_mode_attribute | ( | machine_mode | mode | ) |
The default implementation of TARGET_TRANSLATE_MODE_ATTRIBUTE.
int default_unspec_may_trap_p | ( | const_rtx | x, |
unsigned | flags ) |
References GET_MODE, i, may_trap_p_1(), SCALAR_FLOAT_MODE_P, XVECEXP, and XVECLEN.
scalar_int_mode default_unwind_word_mode | ( | void | ) |
References word_mode.
bool default_use_by_pieces_infrastructure_p | ( | unsigned HOST_WIDE_INT | size, |
unsigned int | alignment, | ||
enum by_pieces_operation | op, | ||
bool | speed_p ) |
Return TRUE if the move_by_pieces/set_by_pieces infrastructure should be used; return FALSE if the cpymem/setmem optab should be expanded, or a call to memcpy emitted.
References by_pieces_ninsns(), CLEAR_BY_PIECES, COMPARE_BY_PIECES, COMPARE_MAX_PIECES, get_move_ratio(), MOVE_BY_PIECES, MOVE_MAX_PIECES, SET_BY_PIECES, STORE_BY_PIECES, and STORE_MAX_PIECES.
bool default_valid_pointer_mode | ( | scalar_int_mode | mode | ) |
Determine whether or not a pointer mode is valid. Assume defaults of ptr_mode or Pmode - can be overridden.
References ptr_mode.
HOST_WIDE_INT default_vector_alignment | ( | const_tree | type | ) |
Default to natural alignment for vector types, bounded by MAX_OFILE_ALIGNMENT.
References GET_MODE_ALIGNMENT, MAX, MAX_OFILE_ALIGNMENT, tree_fits_uhwi_p(), tree_to_uhwi(), TYPE_MODE, and TYPE_SIZE.
vector_costs * default_vectorize_create_costs | ( | vec_info * | vinfo, |
bool | costing_for_scalar ) |
By default, the cost model accumulates three separate costs (prologue, loop body, and epilogue) for a vectorized loop or block. So allocate an array of three unsigned ints, set it to zero, and return its address.
opt_machine_mode default_vectorize_related_mode | ( | machine_mode | vector_mode, |
scalar_mode | element_mode, | ||
poly_uint64 | nunits ) |
The default implementation of TARGET_VECTORIZE_RELATED_MODE.
References element_mode(), GET_MODE_SIZE(), mode_for_vector(), targetm, and VECTOR_MODE_P.
HARD_REG_SET default_zero_call_used_regs | ( | HARD_REG_SET | need_zeroed_hardregs | ) |
The default hook for TARGET_ZERO_CALL_USED_REGS.
References CLEAR_HARD_REG_SET, CONST0_RTX, delete_insns_since(), emit_move_insn(), gcc_assert, gen_rtx_REG(), get_last_insn(), hard_reg_set_empty_p(), hard_regno_nregs(), i, zero_call_used_regs_opts_s::name, NULL, SET_HARD_REG_BIT, sorry(), targetm, TEST_HARD_REG_BIT, valid_insn_p(), zcur_select_mode_rtx(), and zero_call_used_regs_opts.
unsigned int get_move_ratio | ( | bool | speed_p | ) |
For hooks which use the MOVE_RATIO macro, this gives the legacy default behavior. SPEED_P is true if we are compiling for speed.
Referenced by default_use_by_pieces_infrastructure_p(), and sra_get_max_scalarization_size().
unsigned glibc_linux_libm_function_max_error | ( | unsigned | cfn, |
machine_mode | mode, | ||
bool | boundary_p ) |
References default_libm_function_max_error(), df, gcc_fallthrough, ieee_double_format, ieee_extended_intel_128_format, ieee_extended_intel_96_format, ieee_extended_motorola_format, ieee_quad_format, ieee_single_format, mips_double_format, mips_quad_format, mips_single_format, motorola_double_format, motorola_single_format, and REAL_MODE_FORMAT.
bool gnu_libc_has_function | ( | enum function_class | fn_class, |
tree | type ) |
References COMMUTATIVE_P.
bool hook_bool_CUMULATIVE_ARGS_arg_info_false | ( | cumulative_args_t | , |
const function_arg_info & | ) |
bool hook_bool_CUMULATIVE_ARGS_arg_info_true | ( | cumulative_args_t | , |
const function_arg_info & | ) |
bool hook_bool_CUMULATIVE_ARGS_false | ( | cumulative_args_t | ca | ) |
Generic hook that takes a CUMULATIVE_ARGS pointer and returns false.
bool hook_bool_CUMULATIVE_ARGS_true | ( | cumulative_args_t | a | ) |
Generic hook that takes a CUMULATIVE_ARGS pointer and returns true.
bool hook_callee_copies_named | ( | cumulative_args_t | ca, |
const function_arg_info & | arg ) |
Return true if a parameter follows callee copies conventions. This version of the hook is true for all named arguments.
References function_arg_info::named.
int hook_int_CUMULATIVE_ARGS_arg_info_0 | ( | cumulative_args_t | , |
const function_arg_info & | ) |
const char * hook_invalid_arg_for_unprototyped_fn | ( | const_tree | typelist, |
const_tree | funcdecl, | ||
const_tree | val ) |
References NULL.
bool hook_pass_by_reference_must_pass_in_stack | ( | cumulative_args_t | , |
const function_arg_info & | arg ) |
Return true if a parameter must be passed by reference. This version of the TARGET_PASS_BY_REFERENCE hook uses just MUST_PASS_IN_STACK.
References targetm.
void hook_void_bitmap | ( | bitmap | regs | ) |
void hook_void_CUMULATIVE_ARGS | ( | cumulative_args_t | ) |
void hook_void_CUMULATIVE_ARGS_rtx_tree | ( | cumulative_args_t | , |
rtx | , | ||
tree | ) |
void hook_void_CUMULATIVE_ARGS_tree | ( | cumulative_args_t | ca, |
tree | ) |
bool no_c99_libc_has_function | ( | enum function_class | fn_class, |
tree | type ) |
|
inlinestatic |
Return true if the state of option OPTION should be stored in PCH files and checked by default_pch_valid_p. Store the option's current state in STATE if so.
References cl_options, CL_PCH_IGNORE, CL_TARGET, get_option_state(), global_options, option(), option_flag_var(), target_flags, and targetm.
Referenced by default_get_pch_validity(), and default_pch_valid_p().
|
static |
Return a message which says that a PCH file was created with a different setting of OPTION.
Referenced by default_pch_valid_p().
Alternative implementation of TARGET_HAVE_SPECULATION_SAFE_VALUE that can be used on targets that never have speculative execution.
tree std_gimplify_va_arg_expr | ( | tree | valist, |
tree | type, | ||
gimple_seq * | pre_p, | ||
gimple_seq * | post_p ) |
The "standard" implementation of va_arg: read the value from the current (padded) address and increment by the (padded) size.
References arg_size_in_bytes(), ARGS_GROW_DOWNWARD, build2(), build_int_cst(), build_pointer_type(), build_va_arg_indirect_ref(), build_variant_type_copy(), fb_rvalue, fold_build2, fold_build2_loc(), fold_build3, fold_build_pointer_plus, fold_build_pointer_plus_hwi, fold_convert, gcc_unreachable, get_initialized_tmp_var(), gimplify_and_add(), gimplify_expr(), input_location, integer_zerop(), is_gimple_val(), MAX_SUPPORTED_STACK_ALIGNMENT, NULL, PAD_VARARGS_DOWN, pass_va_arg_by_reference(), round_up, SET_TYPE_ALIGN, size_binop, size_int, size_zero_node, sizetype, std_gimplify_va_arg_expr(), targetm, TREE_CODE, TREE_TYPE, TYPE_ALIGN, TYPE_EMPTY_P, TYPE_MODE, TYPE_SIZE, and unshare_expr().
Referenced by std_gimplify_va_arg_expr().
bool target_default_pointer_address_modes_p | ( | void | ) |
Some places still assume that all pointer or address modes are the standard Pmode and ptr_mode. These optimizations become invalid if the target actually supports multiple different modes. For now, we disable such optimizations on such targets, using this function.
References default_addr_space_address_mode(), default_addr_space_pointer_mode(), and targetm.
Referenced by find_base_term(), find_base_value(), nonzero_bits1(), num_sign_bit_copies1(), and simplify_context::simplify_unary_operation_1().
bool targhook_float_words_big_endian | ( | void | ) |
References FLOAT_WORDS_BIG_ENDIAN.
bool targhook_words_big_endian | ( | void | ) |
Make some target macros useable by target-independent code.
|
inlinestatic |
Choose the mode and rtx to use to zero REGNO, storing tem in PMODE and PREGNO_RTX and returning TRUE if successful, otherwise returning FALSE. If the natural mode for REGNO doesn't work, attempt to group it with subsequent adjacent registers set in TOZERO.
References choose_hard_reg_mode(), gcc_checking_assert, gen_rtx_REG(), GET_MODE, hard_regno_max_nregs, regno_reg_rtx, targetm, and TEST_HARD_REG_BIT.
Referenced by default_zero_call_used_regs().
|
static |
Referenced by default_external_stack_protect_fail(), and default_hidden_stack_protect_fail().
|
static |
Initialize the stack protection decls.
Stack protection related decls living in libgcc.
Referenced by default_stack_protect_guard().