8sa1-gcc/gcc/expr.h
Jan Hubicka 357067f243 asan.c (asan_emit_stack_protection): Update.
* asan.c (asan_emit_stack_protection): Update.
	(create_cond_insert_point): Update.
	* auto-profile.c (afdo_propagate_circuit): Update.
	* basic-block.h (struct edge_def): Turn probability to
	profile_probability.
	(EDGE_FREQUENCY): Update.
	* bb-reorder.c (find_traces_1_round): Update.
	(better_edge_p): Update.
	(sanitize_hot_paths): Update.
	* cfg.c (unchecked_make_edge): Initialize probability to uninitialized.
	(make_single_succ_edge): Update.
	(check_bb_profile): Update.
	(dump_edge_info): Update.
	(update_bb_profile_for_threading): Update.
	* cfganal.c (connect_infinite_loops_to_exit): Initialize new edge
	probabilitycount to 0.
	* cfgbuild.c (compute_outgoing_frequencies): Update.
	* cfgcleanup.c (try_forward_edges): Update.
	(outgoing_edges_match): Update.
	(try_crossjump_to_edge): Update.
	* cfgexpand.c (expand_gimple_cond): Update make_single_succ_edge.
	(expand_gimple_tailcall): Update.
	(construct_init_block): Use make_single_succ_edge.
	(construct_exit_block): Use make_single_succ_edge.
	* cfghooks.c (verify_flow_info): Update.
	(redirect_edge_succ_nodup): Update.
	(split_edge): Update.
	(account_profile_record): Update.
	* cfgloopanal.c (single_likely_exit): Update.
	* cfgloopmanip.c (scale_loop_profile): Update.
	(set_zero_probability): Remove.
	(duplicate_loop_to_header_edge): Update.
	* cfgloopmanip.h (loop_version): Update prototype.
	* cfgrtl.c (try_redirect_by_replacing_jump): Update.
	(force_nonfallthru_and_redirect): Update.
	(update_br_prob_note): Update.
	(rtl_verify_edges): Update.
	(purge_dead_edges): Update.
	(rtl_lv_add_condition_to_bb): Update.
	* cgraph.c: (cgraph_edge::redirect_call_stmt_to_calle): Update.
	* cgraphunit.c (init_lowered_empty_function): Update.
	(cgraph_node::expand_thunk): Update.
	* cilk-common.c: Include profile-count.h
	* dojump.c (inv): Remove.
	(jumpifnot): Update.
	(jumpifnot_1): Update.
	(do_jump_1): Update.
	(do_jump): Update.
	(do_jump_by_parts_greater_rtx): Update.
	(do_compare_rtx_and_jump): Update.
	* dojump.h (jumpifnot, jumpifnot_1, jumpif_1, jumpif, do_jump,
	do_jump_1. do_compare_rtx_and_jump): Update prototype.
	* dwarf2cfi.c: Include profile-count.h
	* except.c (dw2_build_landing_pads): Use make_single_succ_edge.
	(sjlj_emit_dispatch_table): Likewise.
	* explow.c: Include profile-count.h
	* expmed.c (emit_store_flag_force): Update.
	(do_cmp_and_jump): Update.
	* expr.c (compare_by_pieces_d::generate): Update.
	(compare_by_pieces_d::finish_mode): Update.
	(emit_block_move_via_loop): Update.
	(store_expr_with_bounds): Update.
	(store_constructor): Update.
	(expand_expr_real_2): Update.
	(expand_expr_real_1): Update.
	* expr.h (try_casesi, try_tablejump): Update prototypes.
	* gimple-pretty-print.c (dump_probability): Update.
	(dump_profile): New.
	(dump_gimple_label): Update.
	(dump_gimple_bb_header): Update.
	* graph.c (draw_cfg_node_succ_edges): Update.
	* hsa-gen.c (convert_switch_statements): Update.
	* ifcvt.c (cheap_bb_rtx_cost_p): Update.
	(find_if_case_1): Update.
	(find_if_case_2): Update.
	* internal-fn.c (expand_arith_overflow_result_store): Update.
	(expand_addsub_overflow): Update.
	(expand_neg_overflow): Update.
	(expand_mul_overflow): Update.
	(expand_vector_ubsan_overflow): Update.
	* ipa-cp.c (good_cloning_opportunity_p): Update.
	* ipa-split.c (split_function): Use make_single_succ_edge.
	* ipa-utils.c (ipa_merge_profiles): Update.
	* loop-doloop.c (add_test): Update.
	(doloop_modify): Update.
	* loop-unroll.c (compare_and_jump_seq): Update.
	(unroll_loop_runtime_iterations): Update.
	* lra-constraints.c (lra_inheritance): Update.
	* lto-streamer-in.c (input_cfg): Update.
	* lto-streamer-out.c (output_cfg): Update.
	* mcf.c (adjust_cfg_counts): Update.
	* modulo-sched.c (sms_schedule): Update.
	* omp-expand.c (expand_omp_for_init_counts): Update.
	(extract_omp_for_update_vars): Update.
	(expand_omp_ordered_sink): Update.
	(expand_omp_for_ordered_loops): Update.
	(expand_omp_for_generic): Update.
	(expand_omp_for_static_nochunk): Update.
	(expand_omp_for_static_chunk): Update.
	(expand_cilk_for): Update.
	(expand_omp_simd): Update.
	(expand_omp_taskloop_for_outer): Update.
	(expand_omp_taskloop_for_inner): Update.
	* omp-simd-clone.c (simd_clone_adjust): Update.
	* optabs.c (expand_doubleword_shift): Update.
	(expand_abs): Update.
	(emit_cmp_and_jump_insn_1): Update.
	(expand_compare_and_swap_loop): Update.
	* optabs.h (emit_cmp_and_jump_insns): Update prototype.
	* predict.c (predictable_edge_p): Update.
	(edge_probability_reliable_p): Update.
	(set_even_probabilities): Update.
	(combine_predictions_for_insn): Update.
	(combine_predictions_for_bb): Update.
	(propagate_freq): Update.
	(estimate_bb_frequencies): Update.
	(force_edge_cold): Update.
	* profile-count.c (profile_count::dump): Add missing space into dump.
	(profile_count::debug): Add newline.
	(profile_count::differs_from_p): Explicitly convert to unsigned.
	(profile_count::stream_in): Update.
	(profile_probability::dump): New member function.
	(profile_probability::debug): New member function.
	(profile_probability::differs_from_p): New member function.
	(profile_probability::differs_lot_from_p): New member function.
	(profile_probability::stream_in): New member function.
	(profile_probability::stream_out): New member function.
	* profile-count.h (profile_count_quality): Rename to ...
	(profile_quality): ... this one.
	(profile_probability): New.
	(profile_count): Update.
	* profile.c (compute_branch_probabilities): Update.
	* recog.c (peep2_attempt): Update.
	* sched-ebb.c (schedule_ebbs): Update.
	* sched-rgn.c (find_single_block_region): Update.
	(compute_dom_prob_ps): Update.
	(schedule_region): Update.
	* sel-sched-ir.c (compute_succs_info): Update.
	* stmt.c (struct case_node): Update.
	(do_jump_if_equal): Update.
	(get_outgoing_edge_probs): Update.
	(conditional_probability): Update.
	(emit_case_dispatch_table): Update.
	(expand_case): Update.
	(expand_sjlj_dispatch_table): Update.
	(emit_case_nodes): Update.
	* targhooks.c: Update.
	* tracer.c (better_p): Update.
	(find_best_successor): Update.
	* trans-mem.c (expand_transaction): Update.
	* tree-call-cdce.c: Update.
	* tree-cfg.c (gimple_split_edge): Upate.
	(move_sese_region_to_fn): Upate.
	* tree-cfgcleanup.c (cleanup_control_expr_graph): Upate.
	* tree-eh.c (lower_resx): Upate.
	(cleanup_empty_eh_move_lp): Upate.
	* tree-if-conv.c (version_loop_for_if_conversion): Update.
	* tree-inline.c (copy_edges_for_bb): Update.
	(copy_cfg_body): Update.
	* tree-parloops.c (gen_parallel_loop): Update.
	* tree-profile.c (gimple_gen_ic_func_profiler): Update.
	(gimple_gen_time_profiler): Update.
	* tree-ssa-dce.c (remove_dead_stmt): Update.
	* tree-ssa-ifcombine.c (update_profile_after_ifcombine): Update.
	* tree-ssa-loop-im.c (execute_sm_if_changed): Update.
	* tree-ssa-loop-ivcanon.c (remove_exits_and_undefined_stmts): Update.
	(unloop_loops): Update.
	(try_peel_loop): Update.
	* tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Update.
	* tree-ssa-loop-split.c (connect_loops): Update.
	(split_loop): Update.
	* tree-ssa-loop-unswitch.c (tree_unswitch_loop): Update.
	(hoist_guard): Update.
	* tree-ssa-phionlycprop.c (propagate_rhs_into_lhs): Update.
	* tree-ssa-phiopt.c (replace_phi_edge_with_variable): Update.
	(value_replacement): Update.
	* tree-ssa-reassoc.c (branch_fixup): Update.
	* tree-ssa-tail-merge.c (replace_block_by): Update.
	* tree-ssa-threadupdate.c (remove_ctrl_stmt_and_useless_edges): Update.
	(create_edge_and_update_destination_phis): Update.
	(compute_path_counts): Update.
	(recompute_probabilities): Update.
	(update_joiner_offpath_counts): Update.
	(freqs_to_counts_path): Update.
	(duplicate_thread_path): Update.
	* tree-switch-conversion.c (hoist_edge_and_branch_if_true): Update.
	(struct switch_conv_info): Update.
	(gen_inbound_check): Update.
	* tree-vect-loop-manip.c (slpeel_add_loop_guard): Update.
	(vect_do_peeling): Update.
	(vect_loop_versioning): Update.
	* tree-vect-loop.c (scale_profile_for_vect_loop): Update.
	(optimize_mask_stores): Update.
	* ubsan.c (ubsan_expand_null_ifn): Update.
	* value-prof.c (gimple_divmod_fixed_value): Update.
	(gimple_divmod_fixed_value_transform): Update.
	(gimple_mod_pow2): Update.
	(gimple_mod_pow2_value_transform): Update.
	(gimple_mod_subtract): Update.
	(gimple_mod_subtract_transform): Update.
	(gimple_ic): Update.
	(gimple_stringop_fixed_value): Update.
	(gimple_stringops_transform): Update.
	* value-prof.h: Update.

From-SVN: r249800
2017-06-29 16:40:53 +00:00

317 lines
12 KiB
C
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/* Definitions for code generation pass of GNU compiler.
Copyright (C) 1987-2017 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/>. */
#ifndef GCC_EXPR_H
#define GCC_EXPR_H
/* This is the 4th arg to `expand_expr'.
EXPAND_STACK_PARM means we are possibly expanding a call param onto
the stack.
EXPAND_SUM means it is ok to return a PLUS rtx or MULT rtx.
EXPAND_INITIALIZER is similar but also record any labels on forced_labels.
EXPAND_CONST_ADDRESS means it is ok to return a MEM whose address
is a constant that is not a legitimate address.
EXPAND_WRITE means we are only going to write to the resulting rtx.
EXPAND_MEMORY means we are interested in a memory result, even if
the memory is constant and we could have propagated a constant value,
or the memory is unaligned on a STRICT_ALIGNMENT target. */
enum expand_modifier {EXPAND_NORMAL = 0, EXPAND_STACK_PARM, EXPAND_SUM,
EXPAND_CONST_ADDRESS, EXPAND_INITIALIZER, EXPAND_WRITE,
EXPAND_MEMORY};
/* Prevent the compiler from deferring stack pops. See
inhibit_defer_pop for more information. */
#define NO_DEFER_POP (inhibit_defer_pop += 1)
/* Allow the compiler to defer stack pops. See inhibit_defer_pop for
more information. */
#define OK_DEFER_POP (inhibit_defer_pop -= 1)
/* This structure is used to pass around information about exploded
unary, binary and trinary expressions between expand_expr_real_1 and
friends. */
typedef struct separate_ops
{
enum tree_code code;
location_t location;
tree type;
tree op0, op1, op2;
} *sepops;
/* This is run during target initialization to set up which modes can be
used directly in memory and to initialize the block move optab. */
extern void init_expr_target (void);
/* This is run at the start of compiling a function. */
extern void init_expr (void);
/* Emit some rtl insns to move data between rtx's, converting machine modes.
Both modes must be floating or both fixed. */
extern void convert_move (rtx, rtx, int);
/* Convert an rtx to specified machine mode and return the result. */
extern rtx convert_to_mode (machine_mode, rtx, int);
/* Convert an rtx to MODE from OLDMODE and return the result. */
extern rtx convert_modes (machine_mode, machine_mode, rtx, int);
/* Expand a call to memcpy or memmove or memcmp, and return the result. */
extern rtx emit_block_op_via_libcall (enum built_in_function, rtx, rtx, rtx,
bool);
static inline rtx
emit_block_copy_via_libcall (rtx dst, rtx src, rtx size, bool tailcall = false)
{
return emit_block_op_via_libcall (BUILT_IN_MEMCPY, dst, src, size, tailcall);
}
static inline rtx
emit_block_move_via_libcall (rtx dst, rtx src, rtx size, bool tailcall = false)
{
return emit_block_op_via_libcall (BUILT_IN_MEMMOVE, dst, src, size, tailcall);
}
static inline rtx
emit_block_comp_via_libcall (rtx dst, rtx src, rtx size, bool tailcall = false)
{
return emit_block_op_via_libcall (BUILT_IN_MEMCMP, dst, src, size, tailcall);
}
/* Emit code to move a block Y to a block X. */
enum block_op_methods
{
BLOCK_OP_NORMAL,
BLOCK_OP_NO_LIBCALL,
BLOCK_OP_CALL_PARM,
/* Like BLOCK_OP_NORMAL, but the libcall can be tail call optimized. */
BLOCK_OP_TAILCALL
};
typedef rtx (*by_pieces_constfn) (void *, HOST_WIDE_INT, machine_mode);
extern rtx emit_block_move (rtx, rtx, rtx, enum block_op_methods);
extern rtx emit_block_move_hints (rtx, rtx, rtx, enum block_op_methods,
unsigned int, HOST_WIDE_INT,
unsigned HOST_WIDE_INT,
unsigned HOST_WIDE_INT,
unsigned HOST_WIDE_INT);
extern rtx emit_block_cmp_hints (rtx, rtx, rtx, tree, rtx, bool,
by_pieces_constfn, void *);
extern bool emit_storent_insn (rtx to, rtx from);
/* Copy all or part of a value X into registers starting at REGNO.
The number of registers to be filled is NREGS. */
extern void move_block_to_reg (int, rtx, int, machine_mode);
/* Copy all or part of a BLKmode value X out of registers starting at REGNO.
The number of registers to be filled is NREGS. */
extern void move_block_from_reg (int, rtx, int);
/* Generate a non-consecutive group of registers represented by a PARALLEL. */
extern rtx gen_group_rtx (rtx);
/* Load a BLKmode value into non-consecutive registers represented by a
PARALLEL. */
extern void emit_group_load (rtx, rtx, tree, int);
/* Similarly, but load into new temporaries. */
extern rtx emit_group_load_into_temps (rtx, rtx, tree, int);
/* Move a non-consecutive group of registers represented by a PARALLEL into
a non-consecutive group of registers represented by a PARALLEL. */
extern void emit_group_move (rtx, rtx);
/* Move a group of registers represented by a PARALLEL into pseudos. */
extern rtx emit_group_move_into_temps (rtx);
/* Store a BLKmode value from non-consecutive registers represented by a
PARALLEL. */
extern void emit_group_store (rtx, rtx, tree, int);
extern rtx maybe_emit_group_store (rtx, tree);
/* Mark REG as holding a parameter for the next CALL_INSN.
Mode is TYPE_MODE of the non-promoted parameter, or VOIDmode. */
extern void use_reg_mode (rtx *, rtx, machine_mode);
extern void clobber_reg_mode (rtx *, rtx, machine_mode);
extern rtx copy_blkmode_to_reg (machine_mode, tree);
/* Mark REG as holding a parameter for the next CALL_INSN. */
static inline void
use_reg (rtx *fusage, rtx reg)
{
use_reg_mode (fusage, reg, VOIDmode);
}
/* Mark REG as clobbered by the call with FUSAGE as CALL_INSN_FUNCTION_USAGE. */
static inline void
clobber_reg (rtx *fusage, rtx reg)
{
clobber_reg_mode (fusage, reg, VOIDmode);
}
/* Mark NREGS consecutive regs, starting at REGNO, as holding parameters
for the next CALL_INSN. */
extern void use_regs (rtx *, int, int);
/* Mark a PARALLEL as holding a parameter for the next CALL_INSN. */
extern void use_group_regs (rtx *, rtx);
#ifdef GCC_INSN_CODES_H
extern rtx expand_cmpstrn_or_cmpmem (insn_code, rtx, rtx, rtx, tree, rtx,
HOST_WIDE_INT);
#endif
/* Write zeros through the storage of OBJECT.
If OBJECT has BLKmode, SIZE is its length in bytes. */
extern rtx clear_storage (rtx, rtx, enum block_op_methods);
extern rtx clear_storage_hints (rtx, rtx, enum block_op_methods,
unsigned int, HOST_WIDE_INT,
unsigned HOST_WIDE_INT,
unsigned HOST_WIDE_INT,
unsigned HOST_WIDE_INT);
/* The same, but always output an library call. */
extern rtx set_storage_via_libcall (rtx, rtx, rtx, bool = false);
/* Expand a setmem pattern; return true if successful. */
extern bool set_storage_via_setmem (rtx, rtx, rtx, unsigned int,
unsigned int, HOST_WIDE_INT,
unsigned HOST_WIDE_INT,
unsigned HOST_WIDE_INT,
unsigned HOST_WIDE_INT);
/* Return nonzero if it is desirable to store LEN bytes generated by
CONSTFUN with several move instructions by store_by_pieces
function. CONSTFUNDATA is a pointer which will be passed as argument
in every CONSTFUN call.
ALIGN is maximum alignment we can assume.
MEMSETP is true if this is a real memset/bzero, not a copy
of a const string. */
extern int can_store_by_pieces (unsigned HOST_WIDE_INT,
by_pieces_constfn,
void *, unsigned int, bool);
/* Generate several move instructions to store LEN bytes generated by
CONSTFUN to block TO. (A MEM rtx with BLKmode). CONSTFUNDATA is a
pointer which will be passed as argument in every CONSTFUN call.
ALIGN is maximum alignment we can assume.
MEMSETP is true if this is a real memset/bzero, not a copy.
Returns TO + LEN. */
extern rtx store_by_pieces (rtx, unsigned HOST_WIDE_INT, by_pieces_constfn,
void *, unsigned int, bool, int);
/* Emit insns to set X from Y. */
extern rtx_insn *emit_move_insn (rtx, rtx);
extern rtx_insn *gen_move_insn (rtx, rtx);
/* Emit insns to set X from Y, with no frills. */
extern rtx_insn *emit_move_insn_1 (rtx, rtx);
extern rtx_insn *emit_move_complex_push (machine_mode, rtx, rtx);
extern rtx_insn *emit_move_complex_parts (rtx, rtx);
extern rtx read_complex_part (rtx, bool);
extern void write_complex_part (rtx, rtx, bool);
extern rtx read_complex_part (rtx, bool);
extern rtx emit_move_resolve_push (machine_mode, rtx);
/* Push a block of length SIZE (perhaps variable)
and return an rtx to address the beginning of the block. */
extern rtx push_block (rtx, int, int);
/* Generate code to push something onto the stack, given its mode and type. */
extern bool emit_push_insn (rtx, machine_mode, tree, rtx, unsigned int,
int, rtx, int, rtx, rtx, int, rtx, bool);
/* Extract the accessible bit-range from a COMPONENT_REF. */
extern void get_bit_range (unsigned HOST_WIDE_INT *, unsigned HOST_WIDE_INT *,
tree, HOST_WIDE_INT *, tree *);
/* Expand an assignment that stores the value of FROM into TO. */
extern void expand_assignment (tree, tree, bool);
/* Generate code for computing expression EXP,
and storing the value into TARGET.
If SUGGEST_REG is nonzero, copy the value through a register
and return that register, if that is possible. */
extern rtx store_expr_with_bounds (tree, rtx, int, bool, bool, tree);
extern rtx store_expr (tree, rtx, int, bool, bool);
/* Given an rtx that may include add and multiply operations,
generate them as insns and return a pseudo-reg containing the value.
Useful after calling expand_expr with 1 as sum_ok. */
extern rtx force_operand (rtx, rtx);
/* Work horses for expand_expr. */
extern rtx expand_expr_real (tree, rtx, machine_mode,
enum expand_modifier, rtx *, bool);
extern rtx expand_expr_real_1 (tree, rtx, machine_mode,
enum expand_modifier, rtx *, bool);
extern rtx expand_expr_real_2 (sepops, rtx, machine_mode,
enum expand_modifier);
/* Generate code for computing expression EXP.
An rtx for the computed value is returned. The value is never null.
In the case of a void EXP, const0_rtx is returned. */
static inline rtx
expand_expr (tree exp, rtx target, machine_mode mode,
enum expand_modifier modifier)
{
return expand_expr_real (exp, target, mode, modifier, NULL, false);
}
static inline rtx
expand_normal (tree exp)
{
return expand_expr_real (exp, NULL_RTX, VOIDmode, EXPAND_NORMAL, NULL, false);
}
/* Return the tree node and offset if a given argument corresponds to
a string constant. */
extern tree string_constant (tree, tree *);
/* Two different ways of generating switch statements. */
extern int try_casesi (tree, tree, tree, tree, rtx, rtx, rtx, profile_probability);
extern int try_tablejump (tree, tree, tree, tree, rtx, rtx, profile_probability);
extern int safe_from_p (const_rtx, tree, int);
/* Get the personality libfunc for a function decl. */
rtx get_personality_function (tree);
/* Determine whether the LEN bytes can be moved by using several move
instructions. Return nonzero if a call to move_by_pieces should
succeed. */
extern bool can_move_by_pieces (unsigned HOST_WIDE_INT, unsigned int);
extern unsigned HOST_WIDE_INT highest_pow2_factor (const_tree);
extern bool categorize_ctor_elements (const_tree, HOST_WIDE_INT *,
HOST_WIDE_INT *, bool *);
extern void expand_operands (tree, tree, rtx, rtx*, rtx*,
enum expand_modifier);
/* rtl.h and tree.h were included. */
/* Return an rtx for the size in bytes of the value of an expr. */
extern rtx expr_size (tree);
#endif /* GCC_EXPR_H */