GCC Middle and Back End API Reference
targhooks.cc File 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)
 

Functions

bool default_legitimate_address_p (machine_mode mode, rtx addr, bool strict, code_helper)
 
void default_external_libcall (rtx fun)
 
int default_unspec_may_trap_p (const_rtx x, unsigned flags)
 
machine_mode default_promote_function_mode (const_tree type, machine_mode mode, int *punsignedp, const_tree funtype, int for_return)
 
machine_mode default_promote_function_mode_always_promote (const_tree type, machine_mode mode, int *punsignedp, const_tree funtype, int for_return)
 
machine_mode default_cc_modes_compatible (machine_mode m1, machine_mode m2)
 
bool default_return_in_memory (const_tree type, const_tree fntype)
 
rtx default_legitimize_address (rtx x, rtx orig_x, machine_mode mode)
 
bool default_legitimize_address_displacement (rtx *, rtx *, poly_int64, machine_mode)
 
bool default_const_not_ok_for_debug_p (rtx x)
 
rtx default_expand_builtin_saveregs (void)
 
void default_setup_incoming_varargs (cumulative_args_t, const function_arg_info &, int *, int)
 
rtx default_builtin_setjmp_frame_value (void)
 
bool hook_bool_CUMULATIVE_ARGS_false (cumulative_args_t ca)
 
bool default_pretend_outgoing_varargs_named (cumulative_args_t ca)
 
scalar_int_mode default_eh_return_filter_mode (void)
 
scalar_int_mode default_libgcc_cmp_return_mode (void)
 
scalar_int_mode default_libgcc_shift_count_mode (void)
 
scalar_int_mode default_unwind_word_mode (void)
 
unsigned HOST_WIDE_INT default_shift_truncation_mask (machine_mode mode)
 
unsigned int default_min_divisions_for_recip_mul (machine_mode mode)
 
int default_mode_rep_extended (scalar_int_mode, scalar_int_mode)
 
bool hook_bool_CUMULATIVE_ARGS_true (cumulative_args_t a)
 
machine_mode default_mode_for_suffix (char suffix)
 
machine_mode default_mode_for_floating_type (enum tree_index ti)
 
tree default_cxx_guard_type (void)
 
tree default_cxx_get_cookie_size (tree type)
 
tree default_cxx_adjust_cdtor_callabi_fntype (tree fntype)
 
bool hook_pass_by_reference_must_pass_in_stack (cumulative_args_t, const function_arg_info &arg)
 
bool hook_callee_copies_named (cumulative_args_t, const function_arg_info &arg)
 
void default_print_operand (FILE *stream, rtx x, int code)
 
void default_print_operand_address (FILE *stream, machine_mode, rtx x)
 
bool default_print_operand_punct_valid_p (unsigned char code)
 
tree default_mangle_assembler_name (const char *name)
 
machine_mode default_translate_mode_attribute (machine_mode mode)
 
bool default_scalar_mode_supported_p (scalar_mode mode)
 
bool default_libgcc_floating_mode_supported_p (scalar_float_mode mode)
 
opt_scalar_float_mode default_floatn_mode (int n, bool extended)
 
bool default_floatn_builtin_p (int func)
 
bool targhook_words_big_endian (void)
 
bool targhook_float_words_big_endian (void)
 
bool default_float_exceptions_rounding_supported_p (void)
 
bool default_decimal_float_supported_p (void)
 
bool default_fixed_point_supported_p (void)
 
bool default_has_ifunc_p (void)
 
bool default_predict_doloop_p (class loop *loop)
 
machine_mode default_preferred_doloop_mode (machine_mode mode)
 
const char * default_invalid_within_doloop (const rtx_insn *insn)
 
tree default_builtin_vectorized_function (unsigned int, tree, tree)
 
tree default_builtin_md_vectorized_function (tree, tree, tree)
 
int default_builtin_vectorization_cost (enum vect_cost_for_stmt type_of_cost, tree vectype, int misalign)
 
tree default_builtin_reciprocal (tree)
 
void default_emit_support_tinfos (emit_support_tinfos_callback)
 
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 &)
 
int hook_int_CUMULATIVE_ARGS_arg_info_0 (cumulative_args_t, const function_arg_info &)
 
void hook_void_CUMULATIVE_ARGS (cumulative_args_t)
 
void hook_void_CUMULATIVE_ARGS_tree (cumulative_args_t ca, tree)
 
void hook_void_CUMULATIVE_ARGS_rtx_tree (cumulative_args_t, rtx, tree)
 
bool default_push_argument (unsigned int)
 
void default_function_arg_advance (cumulative_args_t, const function_arg_info &)
 
HOST_WIDE_INT default_function_arg_offset (machine_mode, const_tree)
 
pad_direction default_function_arg_padding (machine_mode mode, const_tree type)
 
rtx default_function_arg (cumulative_args_t, const function_arg_info &)
 
rtx default_function_incoming_arg (cumulative_args_t, const function_arg_info &)
 
unsigned int default_function_arg_boundary (machine_mode mode, const_tree type)
 
unsigned int default_function_arg_round_boundary (machine_mode mode, const_tree type)
 
void hook_void_bitmap (bitmap regs)
 
const char * hook_invalid_arg_for_unprototyped_fn (const_tree typelist, const_tree funcdecl, const_tree val)
 
tree default_stack_protect_guard (void)
 
tree default_external_stack_protect_fail (void)
 
tree default_hidden_stack_protect_fail (void)
 
bool hook_bool_const_rtx_commutative_p (const_rtx x, int outer_code)
 
rtx default_function_value (const_tree ret_type, const_tree fn_decl_or_type, bool outgoing)
 
rtx default_libcall_value (machine_mode mode, const_rtx fun)
 
bool default_function_value_regno_p (const unsigned int regno)
 
static bool zcur_select_mode_rtx (unsigned int regno, machine_mode *pmode, rtx *pregno_rtx, HARD_REG_SET tozero)
 
HARD_REG_SET default_zero_call_used_regs (HARD_REG_SET need_zeroed_hardregs)
 
rtx default_internal_arg_pointer (void)
 
rtx default_static_chain (const_tree ARG_UNUSED(fndecl_or_type), bool incoming_p)
 
void default_trampoline_init (rtx ARG_UNUSED(m_tramp), tree ARG_UNUSED(t_func), rtx ARG_UNUSED(r_chain))
 
poly_int64 default_return_pops_args (tree, tree, poly_int64)
 
reg_class_t default_ira_change_pseudo_allocno_class (int regno, reg_class_t cl, reg_class_t best_cl)
 
bool default_lra_p (void)
 
int default_register_priority (int hard_regno)
 
bool default_register_usage_leveling_p (void)
 
bool default_different_addr_displacement_p (void)
 
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)
 
machine_mode default_secondary_memory_needed_mode (machine_mode mode)
 
int default_reloc_rw_mask (void)
 
bool default_generate_pic_addr_diff_vec (void)
 
void default_asm_out_constructor (rtx symbol, int priority)
 
void default_asm_out_destructor (rtx symbol, int priority)
 
tree default_mangle_decl_assembler_name (tree decl, tree id)
 
HOST_WIDE_INT default_static_rtx_alignment (machine_mode mode)
 
HOST_WIDE_INT default_constant_alignment (const_tree, HOST_WIDE_INT align)
 
HOST_WIDE_INT constant_alignment_word_strings (const_tree exp, HOST_WIDE_INT align)
 
HOST_WIDE_INT default_vector_alignment (const_tree type)
 
poly_uint64 default_preferred_vector_alignment (const_tree type)
 
bool default_preferred_div_as_shifts_over_mult (const_tree type)
 
bool default_builtin_vector_alignment_reachable (const_tree, bool is_packed)
 
bool default_builtin_support_vector_misalignment (machine_mode mode, const_tree type, int misalignment, bool is_packed)
 
machine_mode default_preferred_simd_mode (scalar_mode)
 
machine_mode default_split_reduction (machine_mode mode)
 
unsigned int default_autovectorize_vector_modes (vector_modes *, bool)
 
opt_machine_mode default_vectorize_related_mode (machine_mode vector_mode, scalar_mode element_mode, poly_uint64 nunits)
 
opt_machine_mode default_get_mask_mode (machine_mode mode)
 
bool default_conditional_operation_is_expensive (unsigned ifn)
 
bool default_empty_mask_is_expensive (unsigned ifn)
 
vector_costsdefault_vectorize_create_costs (vec_info *vinfo, bool costing_for_scalar)
 
bool default_valid_pointer_mode (scalar_int_mode mode)
 
bool default_ref_may_alias_errno (ao_ref *ref)
 
scalar_int_mode default_addr_space_pointer_mode (addr_space_t addrspace)
 
scalar_int_mode default_addr_space_address_mode (addr_space_t addrspace)
 
bool default_addr_space_valid_pointer_mode (scalar_int_mode mode, addr_space_t as)
 
bool target_default_pointer_address_modes_p (void)
 
bool default_addr_space_legitimate_address_p (machine_mode mode, rtx mem, bool strict, addr_space_t as, code_helper code)
 
rtx default_addr_space_legitimize_address (rtx x, rtx oldx, machine_mode mode, addr_space_t as)
 
bool default_addr_space_subset_p (addr_space_t subset, addr_space_t superset)
 
bool default_addr_space_zero_address_valid (addr_space_t as)
 
int default_addr_space_debug (addr_space_t as)
 
void default_addr_space_diagnose_usage (addr_space_t, location_t)
 
rtx default_addr_space_convert (rtx op, tree from_type, tree to_type)
 
unsigned int default_hard_regno_nregs (unsigned int, machine_mode mode)
 
bool default_hard_regno_scratch_ok (unsigned int regno)
 
bool default_mode_dependent_address_p (const_rtx addr, addr_space_t addrspace)
 
bool default_new_address_profitable_p (rtx, rtx)
 
bool default_new_address_profitable_p (rtx memref, rtx_insn *insn, rtx new_addr)
 
bool default_target_option_valid_attribute_p (tree ARG_UNUSED(fndecl), tree ARG_UNUSED(name), tree ARG_UNUSED(args), int ARG_UNUSED(flags))
 
bool default_target_option_valid_version_attribute_p (tree ARG_UNUSED(fndecl), tree ARG_UNUSED(name), tree ARG_UNUSED(args), int ARG_UNUSED(flags))
 
bool default_target_option_pragma_parse (tree ARG_UNUSED(args), tree ARG_UNUSED(pop_target))
 
bool default_target_can_inline_p (tree caller, tree callee)
 
bool default_need_ipa_fn_target_info (const_tree, unsigned int &)
 
bool default_update_ipa_fn_target_info (unsigned int &, const gimple *)
 
unsigned int default_case_values_threshold (void)
 
bool default_have_conditional_execution (void)
 
bool default_have_ccmp (void)
 
bool default_libc_has_function (enum function_class fn_class, tree type)
 
bool default_libc_has_fast_function (int fcode)
 
bool gnu_libc_has_function (enum function_class fn_class, tree type)
 
bool no_c99_libc_has_function (enum function_class fn_class, tree type)
 
bool bsd_libc_has_function (enum function_class fn_class, tree type)
 
unsigned default_fortify_source_default_level ()
 
unsigned default_libm_function_max_error (unsigned, machine_mode, bool)
 
unsigned glibc_linux_libm_function_max_error (unsigned cfn, machine_mode mode, bool boundary_p)
 
tree default_builtin_tm_load_store (tree ARG_UNUSED(type))
 
int default_memory_move_cost (machine_mode mode, reg_class_t rclass, bool in)
 
int default_register_move_cost (machine_mode mode, reg_class_t from, reg_class_t to)
 
bool default_slow_unaligned_access (machine_mode, unsigned int)
 
HOST_WIDE_INT default_estimated_poly_value (poly_int64 x, poly_value_estimate_kind)
 
unsigned int get_move_ratio (bool speed_p)
 
bool default_use_by_pieces_infrastructure_p (unsigned HOST_WIDE_INT size, unsigned int alignment, enum by_pieces_operation op, bool speed_p)
 
int default_compare_by_pieces_branch_ratio (machine_mode)
 
void default_print_patchable_function_entry (FILE *file, unsigned HOST_WIDE_INT patch_area_size, bool record_p)
 
bool default_profile_before_prologue (void)
 
reg_class_t default_preferred_reload_class (rtx x, reg_class_t rclass)
 
reg_class_t default_preferred_output_reload_class (rtx x, reg_class_t rclass)
 
reg_class_t default_preferred_rename_class (reg_class_t rclass)
 
bool default_class_likely_spilled_p (reg_class_t rclass)
 
unsigned char default_class_max_nregs (reg_class_t rclass, machine_mode mode)
 
bool default_avoid_store_forwarding_p (vec< store_fwd_info >, rtx, int total_cost, bool)
 
enum unwind_info_type default_debug_unwind_info (void)
 
unsigned int default_dwarf_poly_indeterminate_value (unsigned int, unsigned int *, int *)
 
machine_mode default_dwarf_frame_reg_mode (int regno)
 
fixed_size_mode default_get_reg_raw_mode (int regno)
 
bool default_keep_leaf_when_profiled ()
 
static bool option_affects_pch_p (int option, struct cl_option_state *state)
 
void * default_get_pch_validity (size_t *sz)
 
static const char * pch_option_mismatch (const char *option)
 
const char * default_pch_valid_p (const void *data_p, size_t len)
 
scalar_int_mode default_cstore_mode (enum insn_code icode)
 
bool default_member_type_forces_blk (const_tree, machine_mode)
 
void default_canonicalize_comparison (int *, rtx *, rtx *, bool)
 
void default_atomic_assign_expand_fenv (tree *, tree *, tree *)
 
tree build_va_arg_indirect_ref (tree addr)
 
tree std_gimplify_va_arg_expr (tree valist, tree type, gimple_seq *pre_p, gimple_seq *post_p)
 
bool can_use_doloop_if_innermost (const widest_int &, const widest_int &, unsigned int loop_depth, bool)
 
bool default_optab_supported_p (int, machine_mode, machine_mode, optimization_type)
 
unsigned int default_max_noce_ifcvt_seq_cost (edge e)
 
unsigned int default_min_arithmetic_precision (void)
 
enum flt_eval_method default_excess_precision (enum excess_precision_type)
 
bool default_bitint_type_info (int, struct bitint_info *)
 
HOST_WIDE_INT default_stack_clash_protection_alloca_probe_range (void)
 
void default_select_early_remat_modes (sbitmap)
 
tree default_preferred_else_value (unsigned, tree type, unsigned, tree *)
 
bool default_have_speculation_safe_value (bool active)
 
bool speculation_safe_value_not_needed (bool active)
 
rtx default_speculation_safe_value (machine_mode mode, rtx result, rtx val, rtx failval)
 
bool default_memtag_can_tag_addresses ()
 
uint8_t default_memtag_tag_size ()
 
uint8_t default_memtag_granule_size ()
 
rtx default_memtag_insert_random_tag (rtx untagged, rtx target)
 
rtx default_memtag_add_tag (rtx base, poly_int64 offset, uint8_t tag_offset)
 
rtx default_memtag_set_tag (rtx untagged, rtx tag, rtx target)
 
rtx default_memtag_extract_tag (rtx tagged_pointer, rtx target)
 
rtx default_memtag_untagged_pointer (rtx tagged_pointer, rtx target)
 

Variables

static tree stack_chk_guard_decl
 
static tree stack_chk_fail_decl
 

Macro Definition Documentation

◆ HWASAN_SHIFT

#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().

◆ HWASAN_SHIFT_RTX

#define HWASAN_SHIFT_RTX   GEN_INT (HWASAN_SHIFT)

◆ PAD_VARARGS_DOWN

#define PAD_VARARGS_DOWN   BYTES_BIG_ENDIAN

Function Documentation

◆ bsd_libc_has_function()

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_va_arg_indirect_ref()

tree build_va_arg_indirect_ref ( tree addr)
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().

◆ can_use_doloop_if_innermost()

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().

◆ constant_alignment_word_strings()

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.

◆ default_addr_space_address_mode()

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().

◆ default_addr_space_convert()

rtx default_addr_space_convert ( rtx op,
tree from_type,
tree to_type )
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.

◆ default_addr_space_debug()

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.   

◆ default_addr_space_diagnose_usage()

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.   

◆ default_addr_space_legitimate_address_p()

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.

◆ default_addr_space_legitimize_address()

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.

◆ default_addr_space_pointer_mode()

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().

◆ default_addr_space_subset_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.   

◆ default_addr_space_valid_pointer_mode()

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.

◆ default_addr_space_zero_address_valid()

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.   

◆ default_asm_out_constructor()

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().

◆ default_asm_out_destructor()

void default_asm_out_destructor ( rtx symbol,
int priority )
Likewise for global destructors.   

References sorry().

◆ default_atomic_assign_expand_fenv()

void default_atomic_assign_expand_fenv ( tree * ,
tree * ,
tree *  )
Default implementation of TARGET_ATOMIC_ASSIGN_EXPAND_FENV.   

◆ default_autovectorize_vector_modes()

unsigned int default_autovectorize_vector_modes ( vector_modes * ,
bool  )
By default only the preferred vector mode is tried.   

◆ default_avoid_store_forwarding_p()

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.

◆ default_bitint_type_info()

bool default_bitint_type_info ( int ,
struct bitint_info *  )
Return true if _BitInt(N) is supported and fill details about it into
*INFO.   

◆ default_builtin_md_vectorized_function()

tree default_builtin_md_vectorized_function ( tree ,
tree ,
tree  )
Mapping of target builtin functions to vectorized variants.   

References NULL_TREE.

◆ default_builtin_reciprocal()

tree default_builtin_reciprocal ( tree )
Reciprocal.   

References NULL_TREE.

◆ default_builtin_setjmp_frame_value()

rtx default_builtin_setjmp_frame_value ( void )
The default implementation of TARGET_BUILTIN_SETJMP_FRAME_VALUE.   

References virtual_stack_vars_rtx.

◆ default_builtin_support_vector_misalignment()

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().

◆ default_builtin_tm_load_store()

tree default_builtin_tm_load_store ( tree ARG_UNUSEDtype)

References NULL_TREE.

◆ default_builtin_vector_alignment_reachable()

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.   

◆ default_builtin_vectorization_cost()

◆ default_builtin_vectorized_function()

tree default_builtin_vectorized_function ( unsigned int ,
tree ,
tree  )
Mapping of builtin functions to vectorized variants.   

References NULL_TREE.

◆ default_canonicalize_comparison()

void default_canonicalize_comparison ( int * ,
rtx * ,
rtx * ,
bool  )
Default version of canonicalize_comparison.   

◆ default_case_values_threshold()

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.

◆ default_cc_modes_compatible()

machine_mode default_cc_modes_compatible ( machine_mode m1,
machine_mode m2 )

◆ default_class_likely_spilled_p()

bool default_class_likely_spilled_p ( reg_class_t rclass)
The default implementation of TARGET_CLASS_LIKELY_SPILLED_P.   

References reg_class_size.

◆ default_class_max_nregs()

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().

◆ default_compare_by_pieces_branch_ratio()

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.   

◆ default_conditional_operation_is_expensive()

bool default_conditional_operation_is_expensive ( unsigned ifn)
By default consider masked stores to be expensive.   

◆ default_const_not_ok_for_debug_p()

bool default_const_not_ok_for_debug_p ( rtx x)

References GET_CODE.

◆ default_constant_alignment()

HOST_WIDE_INT default_constant_alignment ( const_tree ,
HOST_WIDE_INT align )
The default implementation of TARGET_CONSTANT_ALIGNMENT.   

◆ default_cstore_mode()

scalar_int_mode default_cstore_mode ( enum insn_code icode)
Default version of cstore_mode.   

References as_a(), and insn_data.

◆ default_cxx_adjust_cdtor_callabi_fntype()

tree default_cxx_adjust_cdtor_callabi_fntype ( tree fntype)
Returns modified FUNCTION_TYPE for cdtor callabi.   

◆ default_cxx_get_cookie_size()

tree default_cxx_get_cookie_size ( tree type)
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.

◆ default_cxx_guard_type()

tree default_cxx_guard_type ( void )
The generic C++ ABI specifies this is a 64-bit value.   

References long_long_integer_type_node.

◆ default_debug_unwind_info()

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.

◆ default_decimal_float_supported_p()

bool default_decimal_float_supported_p ( void )
True if the target supports decimal floating point.   

◆ default_different_addr_displacement_p()

bool default_different_addr_displacement_p ( void )
extern

◆ default_dwarf_frame_reg_mode()

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.

◆ default_dwarf_poly_indeterminate_value()

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.

◆ default_eh_return_filter_mode()

scalar_int_mode default_eh_return_filter_mode ( void )

References targetm.

◆ default_emit_support_tinfos()

void default_emit_support_tinfos ( emit_support_tinfos_callback )

◆ default_empty_mask_is_expensive()

bool default_empty_mask_is_expensive ( unsigned ifn)
By default consider masked stores to be expensive.   

◆ default_estimated_poly_value()

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.

◆ default_excess_precision()

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.

◆ default_expand_builtin_saveregs()

rtx default_expand_builtin_saveregs ( void )

References const0_rtx, and error().

◆ default_external_libcall()

void default_external_libcall ( rtx fun)

References asm_out_file.

◆ default_external_stack_protect_fail()

◆ default_fixed_point_supported_p()

bool default_fixed_point_supported_p ( void )
True if the target supports fixed-point arithmetic.   

◆ default_float_exceptions_rounding_supported_p()

bool default_float_exceptions_rounding_supported_p ( void )
True if the target supports floating-point exceptions and rounding
modes.   

◆ default_floatn_builtin_p()

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().

◆ default_floatn_mode()

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.

◆ default_fortify_source_default_level()

unsigned default_fortify_source_default_level ( void )
By default, -fhardened will add -D_FORTIFY_SOURCE=2.   

◆ default_function_arg()

rtx default_function_arg ( cumulative_args_t ,
const function_arg_info &  )

References gcc_unreachable.

◆ default_function_arg_advance()

void default_function_arg_advance ( cumulative_args_t ,
const function_arg_info &  )

References gcc_unreachable.

◆ default_function_arg_boundary()

unsigned int default_function_arg_boundary ( machine_mode mode,
const_tree type )

◆ default_function_arg_offset()

HOST_WIDE_INT default_function_arg_offset ( machine_mode ,
const_tree  )
Default implementation of TARGET_FUNCTION_ARG_OFFSET.   

◆ default_function_arg_padding()

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.

◆ default_function_arg_round_boundary()

unsigned int default_function_arg_round_boundary ( machine_mode mode,
const_tree type )

◆ default_function_incoming_arg()

rtx default_function_incoming_arg ( cumulative_args_t ,
const function_arg_info &  )

References gcc_unreachable.

◆ default_function_value()

rtx default_function_value ( const_tree ret_type,
const_tree fn_decl_or_type,
bool outgoing )

References DECL_P, gcc_unreachable, and NULL.

◆ default_function_value_regno_p()

bool default_function_value_regno_p ( const unsigned int regno)
The default hook for TARGET_FUNCTION_VALUE_REGNO_P.   

References gcc_unreachable.

◆ default_generate_pic_addr_diff_vec()

bool default_generate_pic_addr_diff_vec ( void )
By default, address diff vectors are generated
for jump tables when flag_pic is true.   

◆ default_get_mask_mode()

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().

◆ default_get_pch_validity()

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.

◆ default_get_reg_raw_mode()

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.

◆ default_hard_regno_nregs()

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().

◆ default_hard_regno_scratch_ok()

bool default_hard_regno_scratch_ok ( unsigned int regno)

◆ default_has_ifunc_p()

bool default_has_ifunc_p ( void )
True if the target supports GNU indirect functions.   

◆ default_have_ccmp()

bool default_have_ccmp ( void )

References NULL, and targetm.

◆ default_have_conditional_execution()

bool default_have_conditional_execution ( void )

◆ default_have_speculation_safe_value()

bool default_have_speculation_safe_value ( bool active)
Default implementation of TARGET_HAVE_SPECULATION_SAFE_VALUE.   

◆ default_hidden_stack_protect_fail()

◆ default_internal_arg_pointer()

rtx default_internal_arg_pointer ( void )

◆ default_invalid_within_doloop()

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().

◆ default_ira_change_pseudo_allocno_class()

reg_class_t default_ira_change_pseudo_allocno_class ( int regno,
reg_class_t cl,
reg_class_t best_cl )

◆ default_keep_leaf_when_profiled()

bool default_keep_leaf_when_profiled ( )
Return true if a leaf function should stay leaf even with profiling
enabled.   

◆ default_legitimate_address_p()

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.

◆ default_legitimize_address()

rtx default_legitimize_address ( rtx x,
rtx orig_x,
machine_mode mode )

◆ default_legitimize_address_displacement()

bool default_legitimize_address_displacement ( rtx * ,
rtx * ,
poly_int64 ,
machine_mode  )

◆ default_libc_has_fast_function()

bool default_libc_has_fast_function ( int fcode)
By default assume that libc has not a fast implementation.   

◆ default_libc_has_function()

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.

◆ default_libcall_value()

rtx default_libcall_value ( machine_mode mode,
const_rtx fun )

References gcc_unreachable, and MACRO_MODE.

◆ default_libgcc_cmp_return_mode()

scalar_int_mode default_libgcc_cmp_return_mode ( void )

References word_mode.

◆ default_libgcc_floating_mode_supported_p()

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).   

◆ default_libgcc_shift_count_mode()

scalar_int_mode default_libgcc_shift_count_mode ( void )

References word_mode.

◆ default_libm_function_max_error()

unsigned default_libm_function_max_error ( unsigned ,
machine_mode ,
bool  )

◆ default_lra_p()

bool default_lra_p ( void )
extern

◆ default_mangle_assembler_name()

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.

◆ default_mangle_decl_assembler_name()

tree default_mangle_decl_assembler_name ( tree decl,
tree id )
By default, do no modification.  

◆ default_max_noce_ifcvt_seq_cost()

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().

◆ default_member_type_forces_blk()

bool default_member_type_forces_blk ( const_tree ,
machine_mode  )
Default version of member_type_forces_blk.   

◆ default_memory_move_cost()

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().

◆ default_memtag_add_tag()

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().

◆ default_memtag_can_tag_addresses()

bool default_memtag_can_tag_addresses ( )

◆ default_memtag_extract_tag()

rtx default_memtag_extract_tag ( rtx tagged_pointer,
rtx target )
The default implementation of TARGET_MEMTAG_EXTRACT_TAG.   

References expand_simple_binop(), gcc_assert, gen_lowpart, HWASAN_SHIFT_RTX, and OPTAB_DIRECT.

◆ default_memtag_granule_size()

uint8_t default_memtag_granule_size ( )

◆ default_memtag_insert_random_tag()

rtx default_memtag_insert_random_tag ( rtx untagged,
rtx target )
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.

◆ default_memtag_set_tag()

rtx default_memtag_set_tag ( rtx untagged,
rtx tag,
rtx target )
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.

◆ default_memtag_tag_size()

uint8_t default_memtag_tag_size ( )

◆ default_memtag_untagged_pointer()

rtx default_memtag_untagged_pointer ( rtx tagged_pointer,
rtx target )
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.

◆ default_min_arithmetic_precision()

unsigned int default_min_arithmetic_precision ( void )
Default implementation of TARGET_MIN_ARITHMETIC_PRECISION.   

References BITS_PER_WORD, and WORD_REGISTER_OPERATIONS.

◆ default_min_divisions_for_recip_mul()

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().

◆ default_mode_dependent_address_p()

bool default_mode_dependent_address_p ( const_rtx addr,
addr_space_t addrspace )
The default implementation of TARGET_MODE_DEPENDENT_ADDRESS_P.   

◆ default_mode_for_floating_type()

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.

◆ default_mode_for_suffix()

machine_mode default_mode_for_suffix ( char suffix)
Return machine mode for non-standard suffix
or VOIDmode if non-standard suffixes are unsupported.   

◆ default_mode_rep_extended()

int default_mode_rep_extended ( scalar_int_mode ,
scalar_int_mode  )
The default implementation of TARGET_MODE_REP_EXTENDED.   

◆ default_need_ipa_fn_target_info()

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.   

◆ default_new_address_profitable_p() [1/2]

bool default_new_address_profitable_p ( rtx memref,
rtx_insn * insn,
rtx new_addr )
The default implementation of TARGET_NEW_ADDRESS_PROFITABLE_P.   

◆ default_new_address_profitable_p() [2/2]

bool default_new_address_profitable_p ( rtx ,
rtx  )
extern

◆ default_optab_supported_p()

bool default_optab_supported_p ( int ,
machine_mode ,
machine_mode ,
optimization_type  )
Default implementation of TARGET_OPTAB_SUPPORTED_P.   

◆ default_pch_valid_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.

◆ default_predict_doloop_p()

bool default_predict_doloop_p ( class loop * loop)
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.   

◆ default_preferred_div_as_shifts_over_mult()

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.

◆ default_preferred_doloop_mode()

machine_mode default_preferred_doloop_mode ( machine_mode mode)
By default, just use the input MODE itself.   

◆ default_preferred_else_value()

tree default_preferred_else_value ( unsigned ,
tree type,
unsigned ,
tree *  )
The default implementation of TARGET_PREFERRED_ELSE_VALUE.   

References build_zero_cst().

◆ default_preferred_output_reload_class()

reg_class_t default_preferred_output_reload_class ( rtx x,
reg_class_t rclass )
The default implementation of TARGET_OUTPUT_PREFERRED_RELOAD_CLASS.   

◆ default_preferred_reload_class()

reg_class_t default_preferred_reload_class ( rtx x,
reg_class_t rclass )
The default implementation of TARGET_PREFERRED_RELOAD_CLASS.   

◆ default_preferred_rename_class()

reg_class_t default_preferred_rename_class ( reg_class_t rclass)
The default implementation of TARGET_PREFERRED_RENAME_CLASS.   

◆ default_preferred_simd_mode()

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.

◆ default_preferred_vector_alignment()

poly_uint64 default_preferred_vector_alignment ( const_tree type)
The default implementation of
TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT.   

References TYPE_ALIGN.

◆ default_pretend_outgoing_varargs_named()

bool default_pretend_outgoing_varargs_named ( cumulative_args_t ca)

◆ default_print_operand()

void default_print_operand ( FILE * stream,
rtx x,
int code )
Emit to STREAM the assembler syntax for insn operand X.   

References gcc_unreachable.

◆ default_print_operand_address()

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.

◆ default_print_operand_punct_valid_p()

bool default_print_operand_punct_valid_p ( unsigned char code)
Return true if CODE is a valid punctuation character for the
`print_operand' hook.   

◆ default_print_patchable_function_entry()

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().

◆ default_profile_before_prologue()

bool default_profile_before_prologue ( void )

◆ default_promote_function_mode()

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().

◆ default_promote_function_mode_always_promote()

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().

◆ default_push_argument()

bool default_push_argument ( unsigned int )
Default implementation of TARGET_PUSH_ARGUMENT.   

References ACCUMULATE_OUTGOING_ARGS.

◆ default_ref_may_alias_errno()

bool default_ref_may_alias_errno ( ao_ref * ref)
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.

◆ default_register_move_cost()

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.

◆ default_register_priority()

int default_register_priority ( int hard_regno)

◆ default_register_usage_leveling_p()

bool default_register_usage_leveling_p ( void )
extern

◆ default_reloc_rw_mask()

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.   

◆ default_return_in_memory()

bool default_return_in_memory ( const_tree type,
const_tree fntype )

References TYPE_MODE.

◆ default_return_pops_args()

poly_int64 default_return_pops_args ( tree ,
tree ,
poly_int64  )

◆ default_scalar_mode_supported_p()

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.

◆ default_secondary_memory_needed_mode()

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.

◆ default_secondary_reload()

◆ default_select_early_remat_modes()

void default_select_early_remat_modes ( sbitmap )
The default implementation of TARGET_EARLY_REMAT_MODES.   

◆ default_setup_incoming_varargs()

void default_setup_incoming_varargs ( cumulative_args_t ,
const function_arg_info & ,
int * ,
int  )

◆ default_shift_truncation_mask()

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.

◆ default_slow_unaligned_access()

bool default_slow_unaligned_access ( machine_mode ,
unsigned int  )
The default implementation of TARGET_SLOW_UNALIGNED_ACCESS.   

◆ default_speculation_safe_value()

rtx default_speculation_safe_value ( machine_mode mode,
rtx result,
rtx val,
rtx failval )
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().

◆ default_split_reduction()

machine_mode default_split_reduction ( machine_mode mode)
By default do not split reductions further.   

◆ default_stack_clash_protection_alloca_probe_range()

HOST_WIDE_INT default_stack_clash_protection_alloca_probe_range ( void )
Default implementation for
TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE.   

◆ default_stack_protect_guard()

◆ default_static_chain()

rtx default_static_chain ( const_tree ARG_UNUSEDfndecl_or_type,
bool incoming_p )

◆ default_static_rtx_alignment()

HOST_WIDE_INT default_static_rtx_alignment ( machine_mode mode)
The default implementation of TARGET_STATIC_RTX_ALIGNMENT.   

References GET_MODE_ALIGNMENT.

◆ default_target_can_inline_p()

bool default_target_can_inline_p ( tree caller,
tree callee )

◆ default_target_option_pragma_parse()

bool default_target_option_pragma_parse ( tree ARG_UNUSEDargs,
tree ARG_UNUSEDpop_target )

References warning().

◆ default_target_option_valid_attribute_p()

bool default_target_option_valid_attribute_p ( tree ARG_UNUSEDfndecl,
tree ARG_UNUSEDname,
tree ARG_UNUSEDargs,
int ARG_UNUSEDflags )

References warning().

◆ default_target_option_valid_version_attribute_p()

bool default_target_option_valid_version_attribute_p ( tree ARG_UNUSEDfndecl,
tree ARG_UNUSEDname,
tree ARG_UNUSEDargs,
int ARG_UNUSEDflags )

References warning().

◆ default_trampoline_init()

void default_trampoline_init ( rtx ARG_UNUSEDm_tramp,
tree ARG_UNUSEDt_func,
rtx ARG_UNUSEDr_chain )

References sorry().

◆ default_translate_mode_attribute()

machine_mode default_translate_mode_attribute ( machine_mode mode)
The default implementation of TARGET_TRANSLATE_MODE_ATTRIBUTE.   

◆ default_unspec_may_trap_p()

int default_unspec_may_trap_p ( const_rtx x,
unsigned flags )

◆ default_unwind_word_mode()

scalar_int_mode default_unwind_word_mode ( void )

References word_mode.

◆ default_update_ipa_fn_target_info()

bool default_update_ipa_fn_target_info ( unsigned int & ,
const gimple *  )

◆ default_use_by_pieces_infrastructure_p()

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.

◆ default_valid_pointer_mode()

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.

◆ default_vector_alignment()

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.

◆ default_vectorize_create_costs()

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.   

◆ default_vectorize_related_mode()

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.

◆ default_zero_call_used_regs()

◆ get_move_ratio()

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().

◆ glibc_linux_libm_function_max_error()

◆ gnu_libc_has_function()

bool gnu_libc_has_function ( enum function_class fn_class,
tree type )

◆ hook_bool_const_rtx_commutative_p()

bool hook_bool_const_rtx_commutative_p ( const_rtx x,
int outer_code )

References COMMUTATIVE_P.

◆ hook_bool_CUMULATIVE_ARGS_arg_info_false()

bool hook_bool_CUMULATIVE_ARGS_arg_info_false ( cumulative_args_t ,
const function_arg_info &  )

◆ hook_bool_CUMULATIVE_ARGS_arg_info_true()

bool hook_bool_CUMULATIVE_ARGS_arg_info_true ( cumulative_args_t ,
const function_arg_info &  )

◆ hook_bool_CUMULATIVE_ARGS_false()

bool hook_bool_CUMULATIVE_ARGS_false ( cumulative_args_t ca)
Generic hook that takes a CUMULATIVE_ARGS pointer and returns false.   

◆ hook_bool_CUMULATIVE_ARGS_true()

bool hook_bool_CUMULATIVE_ARGS_true ( cumulative_args_t a)
Generic hook that takes a CUMULATIVE_ARGS pointer and returns true.   

◆ hook_callee_copies_named()

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.

◆ hook_int_CUMULATIVE_ARGS_arg_info_0()

int hook_int_CUMULATIVE_ARGS_arg_info_0 ( cumulative_args_t ,
const function_arg_info &  )

◆ hook_invalid_arg_for_unprototyped_fn()

const char * hook_invalid_arg_for_unprototyped_fn ( const_tree typelist,
const_tree funcdecl,
const_tree val )

References NULL.

◆ hook_pass_by_reference_must_pass_in_stack()

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.

◆ hook_void_bitmap()

void hook_void_bitmap ( bitmap regs)

◆ hook_void_CUMULATIVE_ARGS()

void hook_void_CUMULATIVE_ARGS ( cumulative_args_t )

◆ hook_void_CUMULATIVE_ARGS_rtx_tree()

void hook_void_CUMULATIVE_ARGS_rtx_tree ( cumulative_args_t ,
rtx ,
tree  )

◆ hook_void_CUMULATIVE_ARGS_tree()

void hook_void_CUMULATIVE_ARGS_tree ( cumulative_args_t ca,
tree  )

◆ no_c99_libc_has_function()

bool no_c99_libc_has_function ( enum function_class fn_class,
tree type )

◆ option_affects_pch_p()

static bool option_affects_pch_p ( int option,
struct cl_option_state * state )
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().

◆ pch_option_mismatch()

static const char * pch_option_mismatch ( const char * option)
static
Return a message which says that a PCH file was created with a different
setting of OPTION.   

References _, and option().

Referenced by default_pch_valid_p().

◆ speculation_safe_value_not_needed()

bool speculation_safe_value_not_needed ( bool active)
Alternative implementation of TARGET_HAVE_SPECULATION_SAFE_VALUE
that can be used on targets that never have speculative execution.   

◆ std_gimplify_va_arg_expr()

◆ target_default_pointer_address_modes_p()

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().

◆ targhook_float_words_big_endian()

bool targhook_float_words_big_endian ( void )

◆ targhook_words_big_endian()

bool targhook_words_big_endian ( void )
Make some target macros useable by target-independent code.   

◆ zcur_select_mode_rtx()

static bool zcur_select_mode_rtx ( unsigned int regno,
machine_mode * pmode,
rtx * pregno_rtx,
HARD_REG_SET tozero )
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().

Variable Documentation

◆ stack_chk_fail_decl

tree stack_chk_fail_decl
static

◆ stack_chk_guard_decl

tree stack_chk_guard_decl
static
Initialize the stack protection decls.   
Stack protection related decls living in libgcc.   

Referenced by default_stack_protect_guard().