Age | Commit message (Collapse) | Author | Files | Lines |
|
From-SVN: r219188
|
|
From-SVN: r218887
|
|
From-SVN: r218886
|
|
2014-12-03 Tom de Vries <tom@codesourcery.com>
PR rtl-optimization/63957
* doc/invoke.texi: Replace -fuse-caller-save with -fipa-ra.
* final.c (rest_of_handle_final): Replace flag_use_caller_save with
flag_ipa_ra.
(get_call_reg_set_usage): Same.
* lra-assigns.c (lra_assign): Same.
* lra-constraints.c (need_for_call_save_p): Same.
* lra-lives.c (process_bb_lives): Same.
* lra.c (lra): Same.
* calls.c (expand_call): Same.
(emit_library_call_value_1): Same.
* config/arm/arm.c (arm_option_override): Same.
* opts.c (default_options_table): Replace OPT_fuse_caller_save with
OPT_fipa_ra.
* target.def (call_fusage_contains_non_callee_clobbers): Replace
fuse-caller-save with fipa-ra.
* doc/tm.texi (TARGET_CALL_FUSAGE_CONTAINS_NON_CALLEE_CLOBBERS): Same.
* common.opt: Same.
* gcc.dg/ira-shrinkwrap-prep-1.c: Replace -fno-use-caller-save with
-fno-ipa-ra.
* gcc.dg/ira-shrinkwrap-prep-2.c: Same.
* gcc.target/aarch64/aapcs64/aapcs64.exp: Same.
* gcc.dg/fuse-caller-save.c: Replace -fuse-caller-save with -fipa-ra.
* gcc.target/aarch64/fuse-caller-save.c: Same.
* gcc.target/arm/fuse-caller-save.c: Same.
* gcc.target/i386/fuse-caller-save-rec.c: Same.
* gcc.target/i386/fuse-caller-save-xmm-run.c: Same.
* gcc.target/i386/fuse-caller-save-xmm.c: Same.
* gcc.target/i386/fuse-caller-save.c: Same.
* gcc.target/mips/fuse-caller-save-micromips.c: Same.
* gcc.target/mips/fuse-caller-save-mips16.c: Same.
* gcc.target/mips/fuse-caller-save.c: Same.
* gcc.target/mips/mips.exp: Replace use-caller-save with ipa-ra in
-ffoo/-fno-foo options.
From-SVN: r218305
|
|
* target.def (fusion_priority): Wrap code with @smallexample.
* doc/tm.texi: Regenerated.
From-SVN: r218301
|
|
non-conditional jump insns
* sched-deps.c (sched_macro_fuse_insns): Do not check modified_in_p
in the not conditional jump case.
* doc/tm.texi (TARGET_SCHED_MACRO_FUSION_PAIR_P): Update description.
* target.def (TARGET_SCHED_MACRO_FUSION_PAIR_P): Update description.
* gcc.target/aarch64/fuse_adrp_add_1.c: New test.
From-SVN: r218012
|
|
As opposed to always being a decl. This is a prerequisite
to allowing the static chain to be loaded for indirect calls.
* targhooks.c (default_static_chain): Remove check for
DECL_STATIC_CHAIN.
* config/moxie/moxie.c (moxie_static_chain): Likewise.
* config/i386/i386.c (ix86_static_chain): Allow decl or type
as the first argument.
* config/xtensa/xtensa.c (xtensa_static_chain): Change the name
of the unused first parameter.
* doc/tm.texi (TARGET_STATIC_CHAIN): Document the first parameter
may be a type.
* target.def (static_chain): Likewise.
From-SVN: r217769
|
|
unsigned HOST_WIDE_INT size argument
gcc/
PR target/63937
* target.def (use_by_pieces_infrastructure_p): Take unsigned
HOST_WIDE_INT as the size parameter.
* targhooks.c (default_use_by_pieces_infrastructure_p): Likewise.
* targhooks.h (default_use_by_pieces_infrastructure_p): Likewise.
* config/arc/arc.c (arc_use_by_pieces_infrastructure_p)): Likewise.
* config/mips/mips.c (mips_use_by_pieces_infrastructure_p)): Likewise.
* config/s390/s390.c (s390_use_by_pieces_infrastructure_p)): Likewise.
* config/sh/sh.c (sh_use_by_pieces_infrastructure_p)): Likewise.
* config/aarch64/aarch64.c
(aarch64_use_by_pieces_infrastructure_p)): Likewise.
* doc/tm.texi: Regenerate.
gcc/testsuite/
PR target/63937
* gcc.dg/memset-2.c: New.
From-SVN: r217742
|
|
2014-11-17 Zhenqiang Chen <zhenqiang.chen@linaor.org>
* target.def (gen_ccmp_first, gen_ccmp_first): Add two new hooks.
* doc/tm.texi.in (TARGET_GEN_CCMP_FIRST, TARGET_GEN_CCMP_NEXT): New.
* doc/tm.texi (TARGET_GEN_CCMP_FIRST, TARGET_GEN_CCMP_NEXT): New.
From-SVN: r217639
|
|
* doc/tm.texi.in (TARGET_FLAGS_REGNUM): Move around.
* doc/tm.texi: Regenerate.
From-SVN: r217628
|
|
* timevar.def (TV_SCHED_FUSION): New time var.
* passes.def (pass_sched_fusion): New pass.
* config/arm/arm.c (TARGET_SCHED_FUSION_PRIORITY): New.
(extract_base_offset_in_addr, fusion_load_store): New.
(arm_sched_fusion_priority): New.
(arm_option_override): Disable scheduling fusion by default
on non-armv7 processors or ldrd/strd isn't preferred.
* sched-int.h (struct _haifa_insn_data): New field.
(INSN_FUSION_PRIORITY, FUSION_MAX_PRIORITY, sched_fusion): New.
* sched-rgn.c (rest_of_handle_sched_fusion): New.
(pass_data_sched_fusion, pass_sched_fusion): New.
(make_pass_sched_fusion): New.
* haifa-sched.c (sched_fusion): New.
(insn_cost): Handle sched_fusion.
(priority): Handle sched_fusion by calling target hook.
(enum rfs_decision): New enum value.
(rfs_str): New element for RFS_FUSION.
(rank_for_schedule): Support sched_fusion.
(schedule_insn, max_issue, prune_ready_list): Handle sched_fusion.
(schedule_block, fix_tick_ready): Handle sched_fusion.
* common.opt (flag_schedule_fusion): New.
* tree-pass.h (make_pass_sched_fusion): New.
* target.def (fusion_priority): New.
* doc/tm.texi.in (TARGET_SCHED_FUSION_PRIORITY): New.
* doc/tm.texi: Regenerated.
* doc/invoke.texi (-fschedule-fusion): New.
testsuite:
* gcc.target/arm/ldrd-strd-pair-1.c: New test.
* gcc.target/arm/vfp-1.c: Improve scanning string.
From-SVN: r217533
|
|
gcc/
* common.opt (foffload, foffload-abi): New options.
* config/i386/i386.c (ix86_offload_options): New static function.
(TARGET_OFFLOAD_OPTIONS): Define.
* coretypes.h (enum offload_abi): New enum.
* doc/tm.texi: Regenerate.
* doc/tm.texi.in (TARGET_OFFLOAD_OPTIONS): Document.
* gcc.c (offload_targets): New static variable.
(handle_foffload_option): New static function.
(driver_handle_option): Handle OPT_foffload_.
(driver::maybe_putenv_OFFLOAD_TARGETS): Set OFFLOAD_TARGET_NAMES
according to offload_targets.
* hooks.c (hook_charptr_void_null): New hook.
* hooks.h (hook_charptr_void_null): Declare.
* lto-opts.c: Include lto-section-names.h.
(lto_write_options): Append options from target offload_options hook and
store them to offload_lto section. Do not store target-specific,
driver and diagnostic options in offload_lto section.
* lto-wrapper.c (merge_and_complain): Handle OPT_foffload_ and
OPT_foffload_abi_.
(append_compiler_options, append_linker_options)
(append_offload_options): New static functions.
(compile_offload_image): Add new arguments with options.
Call append_compiler_options and append_offload_options.
(compile_images_for_offload_targets): Add new arguments with options.
(find_and_merge_options): New static function.
(run_gcc): Outline options handling into the new functions:
find_and_merge_options, append_compiler_options, append_linker_options.
* opts.c (common_handle_option): Don't handle OPT_foffload_.
Forbid OPT_foffload_abi_ for non-offload compiler.
* target.def (offload_options): New target hook.
Co-Authored-By: Andrey Turetskiy <andrey.turetskiy@intel.com>
Co-Authored-By: Ilya Verbin <ilya.verbin@intel.com>
From-SVN: r217493
|
|
gcc/
* Makefile.in (GTFILES): Add omp-low.h to list of GC files.
* cgraphunit.c: Include omp-low.h.
* doc/tm.texi: Regenerate.
* doc/tm.texi.in (TARGET_RECORD_OFFLOAD_SYMBOL): Document.
* gengtype.c (open_base_files): Add omp-low.h to ifiles.
* lto-cgraph.c (output_offload_tables): New function.
(input_offload_tables): Likewise.
* lto-section-in.c (lto_section_name): Add "offload_table".
* lto-section-names.h (OFFLOAD_VAR_TABLE_SECTION_NAME): Define.
(OFFLOAD_FUNC_TABLE_SECTION_NAME): Likewise.
* lto-streamer-out.c (lto_output): Call output_offload_tables.
* lto-streamer.h (lto_section_type): Add LTO_section_offload_table.
(output_offload_tables, input_offload_tables): Declare.
* omp-low.c: Include common/common-target.h and lto-section-names.h.
(offload_funcs, offload_vars): New global <tree, va_gc> vectors.
(expand_omp_target): Add child_fn into offload_funcs vector.
(add_decls_addresses_to_decl_constructor): New function.
(omp_finish_file): Likewise.
* omp-low.h (omp_finish_file, offload_funcs, offload_vars): Declare.
* target.def (record_offload_symbol): New DEFHOOK.
* toplev.c: Include omp-low.h.
(compile_file): Call omp_finish_file.
* varpool.c: Include omp-low.h.
(varpool_node::get_create): Add decl into offload_vars vector.
gcc/lto/
* lto/lto.c (read_cgraph_and_symbols): Call input_offload_tables.
Co-Authored-By: Andrey Turetskiy <andrey.turetskiy@intel.com>
Co-Authored-By: Bernd Schmidt <bernds@codesourcery.com>
Co-Authored-By: Ilya Tocar <ilya.tocar@intel.com>
Co-Authored-By: Michael Zolotukhin <michael.v.zolotukhin@intel.com>
From-SVN: r217489
|
|
* doc/tm.texi.in (SELECT_CC_MODE): Update example.
(REVERSIBLE_CC_MODE): Fix example.
(REVERSE_CONDITION): Fix typo.
* doc/tm.texi: Regenerate.
From-SVN: r217476
|
|
* target.def (assemble_undefined_decl): New hooks.
* hooks.c (hook_void_FILEptr_constcharptr_const_tree): New function.
* hooks.h (hook_void_FILEptr_constcharptr_const_tree): Declare.
* doc/tm.texi.in (TARGET_ASM_ASSEMBLE_UNDEFINED_DECL): Add.
* doc/tm.texi: Regenerate.
* output.h (assemble_undefined_decl): Declare.
(get_fnname_from_decl): Declare.
* varasm.c (assemble_undefined_decl): New function.
(get_fnname_from_decl): New function.
* final.c (rest_of_handle_final): Use it.
* varpool.c (varpool_output_variables): Call assemble_undefined_decl
for nodes without a definition.
From-SVN: r217293
|
|
* target.def (call_args, end_call_args): New hooks.
* hooks.c (hook_void_rtx_tree): New empty function.
* hooks.h (hook_void_rtx_tree): Declare.
* doc/tm.texi.in (TARGET_CALL_ARGS, TARGET_END_CALL_ARGS): Add.
* doc/tm.texi: Regenerate.
* calls.c (expand_call): Slightly rearrange the code. Use the two new
hooks.
(expand_library_call_value_1): Use the two new hooks.
From-SVN: r217199
|
|
* target.def (decl_end): New hook.
* varasm.c (assemble_variable_contents, assemble_constant_contents):
Use it.
* doc/tm.texi.in (TARGET_ASM_DECL_END): Add.
* doc/tm.texi: Regenerate.
From-SVN: r217196
|
|
gcc/
2014-11-05 Ilya Enkovich <ilya.enkovich@intel.com>
* ipa-chkp.c: New.
* ipa-chkp.h: New.
* tree-chkp.c: New.
* tree-chkp.h: New.
* tree-chkp-opt.c: New.
* rtl-chkp.c: New.
* rtl-chkp.h: New.
* Makefile.in (OBJS): Add ipa-chkp.o, rtl-chkp.o, tree-chkp.o
tree-chkp-opt.o.
(GTFILES): Add tree-chkp.c.
* mode-classes.def (MODE_POINTER_BOUNDS): New.
* tree.def (POINTER_BOUNDS_TYPE): New.
* genmodes.c (complete_mode): Support MODE_POINTER_BOUNDS.
(POINTER_BOUNDS_MODE): New.
(make_pointer_bounds_mode): New.
* machmode.h (POINTER_BOUNDS_MODE_P): New.
* stor-layout.c (int_mode_for_mode): Support MODE_POINTER_BOUNDS.
(layout_type): Support POINTER_BOUNDS_TYPE.
* tree-pretty-print.c (dump_generic_node): Support POINTER_BOUNDS_TYPE.
* tree-core.h (tree_index): Add TI_POINTER_BOUNDS_TYPE.
* tree.c (build_int_cst_wide): Support POINTER_BOUNDS_TYPE.
(type_contains_placeholder_1): Likewise.
(build_common_tree_nodes): Initialize
pointer_bounds_type_node.
* tree.h (POINTER_BOUNDS_TYPE_P): New.
(pointer_bounds_type_node): New.
(POINTER_BOUNDS_P): New.
(BOUNDED_TYPE_P): New.
(BOUNDED_P): New.
(CALL_WITH_BOUNDS_P): New.
* gimple.h (gf_mask): Add GF_CALL_WITH_BOUNDS.
(gimple_call_with_bounds_p): New.
(gimple_call_set_with_bounds): New.
(gimple_return_retbnd): New.
(gimple_return_set_retbnd): New
* gimple.c (gimple_build_return): Increase number of ops
for return statement.
(gimple_build_call_from_tree): Propagate CALL_WITH_BOUNDS_P
flag.
* gimple-pretty-print.c (dump_gimple_return): Print second op.
* rtl.h (CALL_EXPR_WITH_BOUNDS_P): New.
* gimplify.c (gimplify_init_constructor): Avoid infinite
loop during gimplification of bounds initializer.
* calls.c: Include tree-chkp.h, rtl-chkp.h, bitmap.h.
(special_function_p): Use original decl name when analyzing
instrumentation clone.
(arg_data): Add fields special_slot, pointer_arg and
pointer_offset.
(store_bounds): New.
(emit_call_1): Propagate instrumentation flag for CALL.
(initialize_argument_information): Compute pointer_arg,
pointer_offset and special_slot for pointer bounds arguments.
(finalize_must_preallocate): Preallocate when storing bounds
in bounds table.
(compute_argument_addresses): Skip pointer bounds.
(expand_call): Store bounds into tables separately. Return
result joined with resulting bounds.
* cfgexpand.c: Include tree-chkp.h, rtl-chkp.h.
(expand_call_stmt): Propagate bounds flag for CALL_EXPR.
(expand_return): Add returned bounds arg. Handle returned bounds.
(expand_gimple_stmt_1): Adjust to new expand_return signature.
(gimple_expand_cfg): Reset rtx bounds map.
* expr.c: Include tree-chkp.h, rtl-chkp.h.
(expand_assignment): Handle returned bounds.
(store_expr_with_bounds): New. Replaces store_expr with new bounds
target argument. Handle bounds returned by calls.
(store_expr): Now wraps store_expr_with_bounds.
* expr.h (store_expr_with_bounds): New.
* function.c: Include tree-chkp.h, rtl-chkp.h.
(bounds_parm_data): New.
(use_register_for_decl): Do not registerize decls used for bounds
stores and loads.
(assign_parms_augmented_arg_list): Add bounds of the result
structure pointer as the second argument.
(assign_parm_find_entry_rtl): Mark bounds are never passed on
the stack.
(assign_parm_is_stack_parm): Likewise.
(assign_parm_load_bounds): New.
(assign_bounds): New.
(assign_parms): Load bounds and determine a location for
returned bounds.
(diddle_return_value_1): New.
(diddle_return_value): Handle returned bounds.
* function.h (rtl_data): Add field for returned bounds.
* varasm.c: Include tree-chkp.h.
(output_constant): Support POINTER_BOUNDS_TYPE.
(output_constant_pool_2): Support MODE_POINTER_BOUNDS.
(ultimate_transparent_alias_target): Move up.
(make_decl_rtl): For instrumented function use
name of the original decl.
(assemble_start_function): Mark function as global
in case it is instrumentation clone of the global
function.
(do_assemble_alias): Follow transparent alias chain
for identifier. Check if original alias is public.
(maybe_assemble_visibility): Use visibility of the
original function for instrumented version.
(default_unique_section): Likewise.
* emit-rtl.c (immed_double_const): Support MODE_POINTER_BOUNDS.
(init_emit_once): Build pointer bounds zero constants.
* explow.c (trunc_int_for_mode): Support MODE_POINTER_BOUNDS.
* target.def (builtin_chkp_function): New.
(chkp_bound_type): New.
(chkp_bound_mode): New.
(chkp_make_bounds_constant): New.
(chkp_initialize_bounds): New.
(load_bounds_for_arg): New.
(store_bounds_for_arg): New.
(load_returned_bounds): New.
(store_returned_bounds): New.
(chkp_function_value_bounds): New.
(setup_incoming_vararg_bounds): New.
(function_arg): Update hook description with new possible return
value CONST_INT.
* targhooks.h (default_load_bounds_for_arg): New.
(default_store_bounds_for_arg): New.
(default_load_returned_bounds): New.
(default_store_returned_bounds): New.
(default_chkp_bound_type): New.
(default_chkp_bound_mode): New.
(default_builtin_chkp_function): New.
(default_chkp_function_value_bounds): New.
(default_chkp_make_bounds_constant): New.
(default_chkp_initialize_bounds): New.
(default_setup_incoming_vararg_bounds): New.
* targhooks.c (default_load_bounds_for_arg): New.
(default_store_bounds_for_arg): New.
(default_load_returned_bounds): New.
(default_store_returned_bounds): New.
(default_chkp_bound_type): New.
(default_chkp_bound_mode); New.
(default_builtin_chkp_function): New.
(default_chkp_function_value_bounds): New.
(default_chkp_make_bounds_constant): New.
(default_chkp_initialize_bounds): New.
(default_setup_incoming_vararg_bounds): New.
* builtin-types.def (BT_BND): New.
(BT_FN_PTR_CONST_PTR): New.
(BT_FN_CONST_PTR_CONST_PTR): New.
(BT_FN_BND_CONST_PTR): New.
(BT_FN_CONST_PTR_BND): New.
(BT_FN_PTR_CONST_PTR_SIZE): New.
(BT_FN_PTR_CONST_PTR_CONST_PTR): New.
(BT_FN_VOID_PTRPTR_CONST_PTR): New.
(BT_FN_VOID_CONST_PTR_SIZE): New.
(BT_FN_VOID_PTR_BND): New.
(BT_FN_CONST_PTR_CONST_PTR_CONST_PTR): New.
(BT_FN_BND_CONST_PTR_SIZE): New.
(BT_FN_PTR_CONST_PTR_CONST_PTR_SIZE): New.
(BT_FN_VOID_CONST_PTR_BND_CONST_PTR): New.
* chkp-builtins.def: New.
* builtins.def: include chkp-builtins.def.
(DEF_CHKP_BUILTIN): New.
* builtins.c: Include tree-chkp.h and rtl-chkp.h.
(expand_builtin): Support BUILT_IN_CHKP_INIT_PTR_BOUNDS,
BUILT_IN_CHKP_NULL_PTR_BOUNDS, BUILT_IN_CHKP_COPY_PTR_BOUNDS,
BUILT_IN_CHKP_CHECK_PTR_LBOUNDS, BUILT_IN_CHKP_CHECK_PTR_UBOUNDS,
BUILT_IN_CHKP_CHECK_PTR_BOUNDS, BUILT_IN_CHKP_SET_PTR_BOUNDS,
BUILT_IN_CHKP_NARROW_PTR_BOUNDS, BUILT_IN_CHKP_STORE_PTR_BOUNDS,
BUILT_IN_CHKP_GET_PTR_LBOUND, BUILT_IN_CHKP_GET_PTR_UBOUND,
BUILT_IN_CHKP_BNDMK, BUILT_IN_CHKP_BNDSTX, BUILT_IN_CHKP_BNDCL,
BUILT_IN_CHKP_BNDCU, BUILT_IN_CHKP_BNDLDX, BUILT_IN_CHKP_BNDRET,
BUILT_IN_CHKP_INTERSECT, BUILT_IN_CHKP_NARROW,
BUILT_IN_CHKP_EXTRACT_LOWER, BUILT_IN_CHKP_EXTRACT_UPPER.
(std_expand_builtin_va_start): Init bounds for va_list.
* cppbuiltin.c (define_builtin_macros_for_compilation_flags): Add
__CHKP__ macro when Pointer Bounds Checker is on.
* params.def (PARAM_CHKP_MAX_CTOR_SIZE): New.
* passes.def (pass_ipa_chkp_versioning): New.
(pass_early_local_passes): Renamed to pass_build_ssa_passes.
(pass_fixup_cfg): Moved to pass_chkp_instrumentation_passes.
(pass_chkp_instrumentation_passes): New.
(pass_ipa_chkp_produce_thunks): New.
(pass_local_optimization_passes): New.
(pass_chkp_opt): New.
* tree-pass.h (make_pass_ipa_chkp_versioning): New.
(make_pass_ipa_chkp_produce_thunks): New.
(make_pass_chkp): New.
(make_pass_chkp_opt): New.
(make_pass_early_local_passes): Renamed to ...
(make_pass_build_ssa_passes): This.
(make_pass_chkp_instrumentation_passes): New.
(make_pass_local_optimization_passes): New.
* passes.c (pass_manager::execute_early_local_passes): Execute
early passes in three steps.
(execute_all_early_local_passes): Renamed to ...
(execute_build_ssa_passes): This.
(pass_data_early_local_passes): Renamed to ...
(pass_data_build_ssa_passes): This.
(pass_early_local_passes): Renamed to ...
(pass_build_ssa_passes): This.
(pass_data_chkp_instrumentation_passes): New.
(pass_chkp_instrumentation_passes): New.
(pass_data_local_optimization_passes): New.
(pass_local_optimization_passes): New.
(make_pass_early_local_passes): Renamed to ...
(make_pass_build_ssa_passes): This.
(make_pass_chkp_instrumentation_passes): New.
(make_pass_local_optimization_passes): New.
* c-family/c.opt (fcheck-pointer-bounds): New.
(fchkp-check-incomplete-type): New.
(fchkp-zero-input-bounds-for-main): New.
(fchkp-first-field-has-own-bounds): New.
(fchkp-narrow-bounds): New.
(fchkp-narrow-to-innermost-array): New.
(fchkp-optimize): New.
(fchkp-use-fast-string-functions): New.
(fchkp-use-nochk-string-functions): New.
(fchkp-use-static-bounds): New.
(fchkp-use-static-const-bounds): New.
(fchkp-treat-zero-dynamic-size-as-infinite): New.
(fchkp-check-read): New.
(fchkp-check-write): New.
(fchkp-store-bounds): New.
(fchkp-instrument-calls): New.
(fchkp-instrument-marked-only): New.
(Wchkp): New.
* c-family/c-common.c (handle_bnd_variable_size_attribute): New.
(handle_bnd_legacy): New.
(handle_bnd_instrument): New.
(c_common_attribute_table): Add bnd_variable_size, bnd_legacy
and bnd_instrument. Fix documentation.
(c_common_format_attribute_table): Likewsie.
* toplev.c: include tree-chkp.h.
(process_options): Check Pointer Bounds Checker is supported.
(compile_file): Add chkp_finish_file call.
* ipa-cp.c (initialize_node_lattices): Use cgraph_local_p
to handle instrumentation clones properly.
(propagate_constants_accross_call): Do not propagate
through instrumentation thunks.
* ipa-pure-const.c (propagate_pure_const): Support
IPA_REF_CHKP.
* ipa-inline.c (early_inliner): Check edge has summary allocated.
* ipa-split.c: Include tree-chkp.h.
(find_retbnd): New.
(split_part_set_ssa_name_p): New.
(consider_split): Do not split retbnd and retval
producers.
(insert_bndret_call_after): new.
(split_function): Propagate Pointer Bounds Checker
instrumentation marks and handle returned bounds.
* tree-ssa-sccvn.h (vn_reference_op_struct): Transform opcode
into bit field and add with_bounds field.
* tree-ssa-sccvn.c (copy_reference_ops_from_call): Set
with_bounds field for instrumented calls.
* tree-ssa-pre.c (create_component_ref_by_pieces_1): Restore
CALL_WITH_BOUNDS_P flag for calls.
* tree-ssa-ccp.c: Include tree-chkp.h.
(insert_clobber_before_stack_restore): Handle
BUILT_IN_CHKP_BNDRET calls.
* tree-ssa-dce.c: Include tree-chkp.h.
(propagate_necessity): For free call fed by alloc check
bounds are also provided by the same alloc.
(eliminate_unnecessary_stmts): Handle BUILT_IN_CHKP_BNDRET
used by free calls.
* tree-inline.c: Include tree-chkp.h.
(declare_return_variable): Add arg holding
returned bounds slot. Create and initialize returned bounds var.
(remap_gimple_stmt): Handle returned bounds.
Return sequence of statements instead of a single statement.
(insert_init_stmt): Add declaration.
(remap_gimple_seq): Adjust to new remap_gimple_stmt signature.
(copy_bb): Adjust to changed return type of remap_gimple_stmt.
Properly handle bounds in va_arg_pack and va_arg_pack_len.
(expand_call_inline): Handle returned bounds. Add bounds copy
for generated mem to mem assignments.
* tree-inline.h (copy_body_data): Add fields retbnd and
assign_stmts.
* value-prof.c: Include tree-chkp.h.
(gimple_ic): Support returned bounds.
* ipa.c (cgraph_build_static_cdtor_1): Support contructors
with "chkp ctor" and "bnd_legacy" attributes.
(symtab_remove_unreachable_nodes): Keep initial values for
pointer bounds to be used for checks eliminations.
(process_references): Handle IPA_REF_CHKP.
(walk_polymorphic_call_targets): Likewise.
* ipa-visibility.c (cgraph_externally_visible_p): Mark
instrumented 'main' as externally visible.
(function_and_variable_visibility): Filter instrumentation
thunks.
* cgraph.h (cgraph_thunk_info): Add add_pointer_bounds_args
field.
(cgraph_node): Add instrumented_version, orig_decl and
instrumentation_clone fields.
(symtab_node::get_alias_target): Allow IPA_REF_CHKP reference.
(varpool_node): Add need_bounds_init field.
(cgraph_local_p): New.
* cgraph.c: Include tree-chkp.h.
(cgraph_node::remove): Fix instrumented_version
of the referenced node if any.
(cgraph_node::dump): Dump instrumentation_clone and
instrumented_version fields.
(cgraph_node::verify_node): Check correctness of IPA_REF_CHKP
references and instrumentation thunks.
(cgraph_can_remove_if_no_direct_calls_and_refs_p): Keep
all not instrumented instrumentation clones alive.
(cgraph_redirect_edge_call_stmt_to_callee): Support
returned bounds.
* cgraphbuild.c (rebuild_cgraph_edges): Rebuild IPA_REF_CHKP
reference.
(cgraph_rebuild_references): Likewise.
* cgraphunit.c: Include tree-chkp.h.
(assemble_thunks_and_aliases): Skip thunks calling instrumneted
function version.
(varpool_finalize_decl): Register statically initialized decls
in Pointer Bounds Checker.
(walk_polymorphic_call_targets): Do not mark generated call to
__builtin_unreachable as with_bounds.
(output_weakrefs): If there are both instrumented and original
versions, output only one of them.
(cgraph_node::expand_thunk): Set with_bounds flag
for created call statement.
* ipa-ref.h (ipa_ref_use): Add IPA_REF_CHKP.
(ipa_ref): increase size of use field.
* symtab.c (ipa_ref_use_name): Add element for IPA_REF_CHKP.
* varpool.c (dump_varpool_node): Dump need_bounds_init field.
(ctor_for_folding): Do not fold constant bounds vars.
* lto-streamer.h (LTO_minor_version): Change minor version from
0 to 1.
* lto-cgraph.c (compute_ltrans_boundary): Keep initial values for
pointer bounds.
(lto_output_node): Output instrumentation_clone,
thunk.add_pointer_bounds_args and orig_decl field.
(lto_output_ref): Adjust to new ipa_ref::use field size.
(input_overwrite_node): Read instrumentation_clone field.
(input_node): Read thunk.add_pointer_bounds_args and orig_decl
fields.
(input_ref): Adjust to new ipa_ref::use field size.
(input_cgraph_1): Compute instrumented_version fields and restore
IDENTIFIER_TRANSPARENT_ALIAS chains.
(lto_output_varpool_node): Output
need_bounds_init value.
(input_varpool_node): Read need_bounds_init value.
* lto-partition.c (add_symbol_to_partition_1): Keep original
and instrumented versions together.
(privatize_symbol_name): Restore transparent alias chain if required.
(add_references_to_partition): Add references to pointer bounds vars.
* dbxout.c (dbxout_type): Ignore POINTER_BOUNDS_TYPE.
* dwarf2out.c (gen_subprogram_die): Ignore bound args.
(gen_type_die_with_usage): Skip pointer bounds.
(dwarf2out_global_decl): Likewise.
(is_base_type): Support POINTER_BOUNDS_TYPE.
(gen_formal_types_die): Skip pointer bounds.
(gen_decl_die): Likewise.
* var-tracking.c (vt_add_function_parameters): Skip
bounds parameters.
* ipa-icf.c (sem_function::merge): Do not merge when instrumentation
thunk still exists.
(sem_variable::merge): Reset need_bounds_init flag.
* doc/extend.texi: Document Pointer Bounds Checker built-in functions
and attributes.
* doc/tm.texi.in (TARGET_LOAD_BOUNDS_FOR_ARG): New.
(TARGET_STORE_BOUNDS_FOR_ARG): New.
(TARGET_LOAD_RETURNED_BOUNDS): New.
(TARGET_STORE_RETURNED_BOUNDS): New.
(TARGET_CHKP_FUNCTION_VALUE_BOUNDS): New.
(TARGET_SETUP_INCOMING_VARARG_BOUNDS): New.
(TARGET_BUILTIN_CHKP_FUNCTION): New.
(TARGET_CHKP_BOUND_TYPE): New.
(TARGET_CHKP_BOUND_MODE): New.
(TARGET_CHKP_MAKE_BOUNDS_CONSTANT): New.
(TARGET_CHKP_INITIALIZE_BOUNDS): New.
* doc/tm.texi: Regenerated.
* doc/rtl.texi (MODE_POINTER_BOUNDS): New.
(BND32mode): New.
(BND64mode): New.
* doc/invoke.texi (-mmpx): New.
(-mno-mpx): New.
(chkp-max-ctor-size): New.
* config/i386/constraints.md (w): New.
(Ti): New.
(Tb): New.
* config/i386/i386-c.c (ix86_target_macros_internal): Add __MPX__.
* config/i386/i386-modes.def (BND32): New.
(BND64): New.
* config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): New.
* config/i386/i386.c: Include tree-chkp.h, rtl-chkp.h, tree-iterator.h.
(regclass_map): Add bound registers.
(dbx_register_map): Likewise.
(dbx64_register_map): Likewise.
(svr4_dbx_register_map): Likewise.
(isa_opts): Add -mmpx.
(PTA_MPX): New.
(ix86_option_override_internal): Support MPX ISA.
(ix86_conditional_register_usage): Support bound registers.
(ix86_code_end): Add MPX bnd prefix.
(output_set_got): Likewise.
(print_reg): Avoid prefixes for bound registers.
(ix86_print_operand): Add '!' (MPX bnd) print prefix support.
(ix86_print_operand_punct_valid_p): Likewise.
(ix86_print_operand_address): Support UNSPEC_BNDMK_ADDR and
UNSPEC_BNDLDX_ADDR.
(ix86_output_call_insn): Add MPX bnd prefix to branch instructions.
(ix86_class_likely_spilled_p): Add bound regs support.
(ix86_hard_regno_mode_ok): Likewise.
(x86_order_regs_for_local_alloc): Likewise.
(ix86_bnd_prefixed_insn_p): New.
(ix86_builtins): Add
IX86_BUILTIN_BNDMK, IX86_BUILTIN_BNDSTX,
IX86_BUILTIN_BNDLDX, IX86_BUILTIN_BNDCL,
IX86_BUILTIN_BNDCU, IX86_BUILTIN_BNDRET,
IX86_BUILTIN_BNDNARROW, IX86_BUILTIN_BNDINT,
IX86_BUILTIN_SIZEOF, IX86_BUILTIN_BNDLOWER,
IX86_BUILTIN_BNDUPPER.
(builtin_isa): Add leaf_p and nothrow_p fields.
(def_builtin): Initialize leaf_p and nothrow_p.
(ix86_add_new_builtins): Handle leaf_p and nothrow_p
flags.
(bdesc_mpx): New.
(bdesc_mpx_const): New.
(ix86_init_mpx_builtins): New.
(ix86_init_builtins): Call ix86_init_mpx_builtins.
(ix86_emit_cmove): New.
(ix86_emit_move_max): New.
(ix86_expand_builtin): Expand IX86_BUILTIN_BNDMK,
IX86_BUILTIN_BNDSTX, IX86_BUILTIN_BNDLDX,
IX86_BUILTIN_BNDCL, IX86_BUILTIN_BNDCU,
IX86_BUILTIN_BNDRET, IX86_BUILTIN_BNDNARROW,
IX86_BUILTIN_BNDINT, IX86_BUILTIN_SIZEOF,
IX86_BUILTIN_BNDLOWER, IX86_BUILTIN_BNDUPPER.
(ix86_function_value_bounds): New.
(ix86_builtin_mpx_function): New.
(ix86_get_arg_address_for_bt): New.
(ix86_load_bounds): New.
(ix86_store_bounds): New.
(ix86_load_returned_bounds): New.
(ix86_store_returned_bounds): New.
(ix86_mpx_bound_mode): New.
(ix86_make_bounds_constant): New.
(ix86_initialize_bounds):
(TARGET_LOAD_BOUNDS_FOR_ARG): New.
(TARGET_STORE_BOUNDS_FOR_ARG): New.
(TARGET_LOAD_RETURNED_BOUNDS): New.
(TARGET_STORE_RETURNED_BOUNDS): New.
(TARGET_CHKP_BOUND_MODE): New.
(TARGET_BUILTIN_CHKP_FUNCTION): New.
(TARGET_CHKP_FUNCTION_VALUE_BOUNDS): New.
(TARGET_CHKP_MAKE_BOUNDS_CONSTANT): New.
(TARGET_CHKP_INITIALIZE_BOUNDS): New.
(ix86_option_override_internal): Do not
support x32 with MPX.
(init_cumulative_args): Init stdarg, bnd_regno, bnds_in_bt
and force_bnd_pass.
(function_arg_advance_32): Return number of used integer
registers.
(function_arg_advance_64): Likewise.
(function_arg_advance_ms_64): Likewise.
(ix86_function_arg_advance): Handle pointer bounds.
(ix86_function_arg): Likewise.
(ix86_function_value_regno_p): Mark fisrt bounds registers as
possible function value.
(ix86_function_value_1): Handle pointer bounds type/mode
(ix86_return_in_memory): Likewise.
(ix86_print_operand): Analyse insn to decide abounf "bnd" prefix.
(ix86_expand_call): Generate returned bounds.
(ix86_setup_incoming_vararg_bounds): New.
(ix86_va_start): Initialize bounds for pointers in va_list.
(TARGET_SETUP_INCOMING_VARARG_BOUNDS): New.
* config/i386/i386.h (TARGET_MPX): New.
(TARGET_MPX_P): New.
(FIRST_PSEUDO_REGISTER): Fix to new value.
(FIXED_REGISTERS): Add bound registers.
(CALL_USED_REGISTERS): Likewise.
(REG_ALLOC_ORDER): Likewise.
(HARD_REGNO_NREGS): Likewise.
(VALID_BND_REG_MODE): New.
(FIRST_BND_REG): New.
(LAST_BND_REG): New.
(reg_class): Add BND_REGS.
(REG_CLASS_NAMES): Likewise.
(REG_CLASS_CONTENTS): Likewise.
(BND_REGNO_P): New.
(ANY_BND_REG_P): New.
(BNDmode): New.
(HI_REGISTER_NAMES): Add bound registers.
(ix86_args): Add bnd_regno, bnds_in_bt, force_bnd_pass and
stdarg fields.
* config/i386/i386.md (UNSPEC_BNDMK): New.
(UNSPEC_BNDMK_ADDR): New.
(UNSPEC_BNDSTX): New.
(UNSPEC_BNDLDX): New.
(UNSPEC_BNDLDX_ADDR): New.
(UNSPEC_BNDCL): New.
(UNSPEC_BNDCU): New.
(UNSPEC_BNDCN): New.
(UNSPEC_MPX_FENCE): New.
(UNSPEC_SIZEOF): New.
(BND0_REG): New.
(BND1_REG): New.
(type): Add mpxmov, mpxmk, mpxchk, mpxld, mpxst.
(length_immediate): Support mpxmov, mpxmk, mpxchk, mpxld, mpxst.
(prefix_rep): Check for bnd prefix.
(prefix_0f): Support mpxmov, mpxmk, mpxchk, mpxld, mpxst.
(length_nobnd): New.
(length): Use length_nobnd when specified.
(memory): Support mpxmov, mpxmk, mpxchk, mpxld, mpxst.
(BND): New.
(bnd_ptr): New.
(BNDCHECK): New.
(bndcheck): New.
(*jcc_1): Add MPX bnd prefix.
(*jcc_2): Likewise.
(jump): Likewise.
(*indirect_jump): Likewise.
(*tablejump_1): Likewise.
(simple_return_internal): Likewise.
(simple_return_internal_long): Likewise.
(simple_return_pop_internal): Likewise.
(simple_return_indirect_internal): Likewise.
(<mode>_mk): New.
(*<mode>_mk): New.
(mov<mode>): New.
(*mov<mode>_internal_mpx): New.
(<mode>_<bndcheck>): New.
(*<mode>_<bndcheck>): New.
(<mode>_ldx): New.
(*<mode>_ldx): New.
(<mode>_stx): New.
(*<mode>_stx): New.
move_size_reloc_<mode>): New.
* config/i386/predicates.md (address_mpx_no_base_operand): New.
(address_mpx_no_index_operand): New.
(bnd_mem_operator): New.
(symbol_operand): New.
(x86_64_immediate_size_operand): New.
* config/i386/i386.opt (mmpx): New.
* config/i386/i386-builtin-types.def (BND): New.
(ULONG): New.
(BND_FTYPE_PCVOID_ULONG): New.
(VOID_FTYPE_BND_PCVOID): New.
(VOID_FTYPE_PCVOID_PCVOID_BND): New.
(BND_FTYPE_PCVOID_PCVOID): New.
(BND_FTYPE_PCVOID): New.
(BND_FTYPE_BND_BND): New.
(PVOID_FTYPE_PVOID_PVOID_ULONG): New.
(PVOID_FTYPE_PCVOID_BND_ULONG): New.
(ULONG_FTYPE_VOID): New.
(PVOID_FTYPE_BND): New.
gcc/testsuite/
2014-11-05 Ilya Enkovich <ilya.enkovich@intel.com>
* gcc.target/i386/chkp-builtins-1.c: New.
* gcc.target/i386/chkp-builtins-2.c: New.
* gcc.target/i386/chkp-builtins-3.c: New.
* gcc.target/i386/chkp-builtins-4.c: New.
* gcc.target/i386/chkp-remove-bndint-1.c: New.
* gcc.target/i386/chkp-remove-bndint-2.c: New.
* gcc.target/i386/chkp-const-check-1.c: New.
* gcc.target/i386/chkp-const-check-2.c: New.
* gcc.target/i386/chkp-lifetime-1.c: New.
* gcc.dg/pr37858.c: Replace early_local_cleanups pass name
with build_ssa_passes.
From-SVN: r217125
|
|
* target.def (omit_struct_return_reg): New data hook.
* doc/tm.texi.in: Add @hook TARGET_OMIT_STRUCT_RETURN_REG.
* doc/tm.texi: Regenerate.
* function.c (expand_function_end): Use it.
From-SVN: r217123
|
|
* target.def (no_register_allocation): New data hook.
* doc/tm.texi.in: Add @hook TARGET_NO_REGISTER_ALLOCATION.
* doc/tm.texi: Regenerate.
* ira.c (gate_ira): New function.
(pass_data_ira): Set has_gate.
(pass_ira): Add a gate function.
(pass_data_reload): Likewise.
(pass_reload): Add a gate function.
(pass_ira): Use it.
* reload1.c (eliminate_regs): If reg_eliminate_is NULL, assert that
no register allocation happens on the target and return.
* final.c (alter_subreg): Ensure register is not a pseudo before
calling simplify_subreg.
(output_operand): Assert that x isn't a pseudo only if doing
register allocation.
From-SVN: r217122
|
|
gcc/
* doc/tm.texi.in (MOVE_BY_PIECES_P): Remove.
(CLEAR_BY_PIECES_P): Likewise.
(SET_BY_PIECES_P): Likewise.
(STORE_BY_PIECES_P): Likewise.
* doc/tm.texi: Regenerate.
* system.h: Poison MOVE_BY_PIECES_P, CLEAR_BY_PIECES_P,
SET_BY_PIECES_P, STORE_BY_PIECES_P.
* expr.c (MOVE_BY_PIECES_P): Remove.
(CLEAR_BY_PIECES_P): Likewise.
(SET_BY_PIECES_P): Likewise.
(STORE_BY_PIECES_P): Likewise.
(can_move_by_pieces): Rewrite in terms of
targetm.use_by_pieces_infrastructure_p.
(emit_block_move_hints): Likewise.
(can_store_by_pieces): Likewise.
(store_by_pieces): Likewise.
(clear_storage_hints): Likewise.
(emit_push_insn): Likewise.
(expand_constructor): Likewise.
From-SVN: r217004
|
|
gcc/
* target.def (use_by_pieces_infrastructure_p): New.
* doc/tm.texi.in (MOVE_BY_PIECES_P): Describe that this macro
is deprecated.
(STORE_BY_PIECES_P): Likewise.
(CLEAR_BY_PIECES_P): Likewise.
(SET_BY_PIECES_P): Likewise.
(TARGET_MOVE_BY_PIECES_PROFITABLE_P): Add hook.
* doc/tm.texi: Regenerate.
* expr.c (MOVE_BY_PIECES_P): Rewrite in terms of
TARGET_USE_BY_PIECES_INFRASTRUCTURE_P.
(STORE_BY_PIECES_P): Likewise.
(CLEAR_BY_PIECES_P): Likewise.
(SET_BY_PIECES_P): Likewise.
(STORE_MAX_PIECES): Move to...
* defaults.h (STORE_MAX_PIECES): ...here.
* targhooks.c (get_move_ratio): New.
(default_use_by_pieces_infrastructure_p): Likewise.
* targhooks.h (default_use_by_pieces_infrastructure_p): New.
* target.h (by_pieces_operation): New.
From-SVN: r216996
|
|
gcc/ada/
* gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c,
gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c:
Remove redundant enum from machine_mode.
gcc/c-family/
* c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
enum from machine_mode.
gcc/c/
* c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
machine_mode.
gcc/cp/
* constexpr.c: Remove redundant enum from machine_mode.
gcc/fortran/
* trans-types.c, trans-types.h: Remove redundant enum from
machine_mode.
gcc/go/
* go-lang.c: Remove redundant enum from machine_mode.
gcc/java/
* builtins.c, java-tree.h, typeck.c: Remove redundant enum from
machine_mode.
gcc/lto/
* lto-lang.c: Remove redundant enum from machine_mode.
gcc/
* addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c,
builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h,
cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c,
config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md,
config/aarch64/aarch64.c, config/aarch64/aarch64.h,
config/aarch64/aarch64.md, config/alpha/alpha-protos.h,
config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c,
config/arc/arc.h, config/arc/predicates.md,
config/arm/aarch-common-protos.h, config/arm/aarch-common.c,
config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h,
config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md,
config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c,
config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c,
config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md,
config/cr16/cr16-protos.h, config/cr16/cr16.c,
config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md,
config/darwin-protos.h, config/darwin.c,
config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c,
config/epiphany/epiphany.md, config/fr30/fr30.c,
config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md,
config/h8300/h8300-protos.h, config/h8300/h8300.c,
config/i386/i386-builtin-types.awk, config/i386/i386-protos.h,
config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md,
config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h,
config/ia64/ia64.c, config/iq2000/iq2000-protos.h,
config/iq2000/iq2000.c, config/iq2000/iq2000.md,
config/lm32/lm32-protos.h, config/lm32/lm32.c,
config/m32c/m32c-protos.h, config/m32c/m32c.c,
config/m32r/m32r-protos.h, config/m32r/m32r.c,
config/m68k/m68k-protos.h, config/m68k/m68k.c,
config/mcore/mcore-protos.h, config/mcore/mcore.c,
config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c,
config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c,
config/mips/mips-protos.h, config/mips/mips.c,
config/mmix/mmix-protos.h, config/mmix/mmix.c,
config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c,
config/moxie/moxie.c, config/msp430/msp430-protos.h,
config/msp430/msp430.c, config/nds32/nds32-cost.c,
config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c,
config/nds32/nds32-protos.h, config/nds32/nds32.c,
config/nios2/nios2-protos.h, config/nios2/nios2.c,
config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h,
config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c,
config/rs6000/altivec.md, config/rs6000/rs6000-c.c,
config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c,
config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c,
config/s390/predicates.md, config/s390/s390-protos.h,
config/s390/s390.c, config/s390/s390.h, config/s390/s390.md,
config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c,
config/sh/sh.md, config/sparc/predicates.md,
config/sparc/sparc-protos.h, config/sparc/sparc.c,
config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c,
config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c,
config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c,
config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h,
config/tilepro/tilepro.c, config/v850/v850-protos.h,
config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h,
config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h,
config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h,
dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi,
doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c,
dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h,
except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c,
fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h,
fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c,
genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c,
graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c,
internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c,
ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h,
libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c,
loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c,
lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c,
lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h,
output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h,
recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c,
regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h,
rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c,
sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c,
simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def,
targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c,
tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c,
tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c,
tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c,
tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c,
tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c,
tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c,
tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c,
tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c,
tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c,
var-tracking.c, varasm.c: Remove redundant enum from
machine_mode.
gcc/
* gengtype.c (main): Treat machine_mode as a scalar typedef.
* genmodes.c (emit_insn_modes_h): Hide inline functions if
USED_FOR_TARGET.
From-SVN: r216834
|
|
gcc/
PR target/8340
PR middle-end/47602
PR rtl-optimization/55458
* config/i386/i386.c (ix86_use_pseudo_pic_reg): New.
(ix86_init_pic_reg): New.
(ix86_select_alt_pic_regnum): Add check on pseudo register.
(ix86_save_reg): Likewise.
(ix86_expand_prologue): Remove PIC register initialization
now performed in ix86_init_pic_reg.
(ix86_output_function_epilogue): Add check on pseudo register.
(set_pic_reg_ever_alive): New.
(legitimize_pic_address): Replace df_set_regs_ever_live with new
set_pic_reg_ever_alive.
(legitimize_tls_address): Likewise.
(ix86_pic_register_p): New check.
(ix86_delegitimize_address): Add check on pseudo register.
(ix86_expand_call): Insert move from pseudo PIC register to ABI
defined REAL_PIC_OFFSET_TABLE_REGNUM.
(TARGET_INIT_PIC_REG): New.
(TARGET_USE_PSEUDO_PIC_REG): New.
* config/i386/i386.h (PIC_OFFSET_TABLE_REGNUM): Return INVALID_REGNUM
if pic_offset_table_rtx exists.
* doc/tm.texi.in (TARGET_USE_PSEUDO_PIC_REG, TARGET_INIT_PIC_REG):
Document.
* doc/tm.texi: Regenerate.
* function.c (assign_parms): Generate pseudo register for PIC.
* init-regs.c (initialize_uninitialized_regs): Ignor pseudo PIC
register.
* ira-color.c (color_pass): Add check on pseudo register.
* ira-emit.c (change_loop): Don't create copies for PIC pseudo
register.
* ira.c (split_live_ranges_for_shrink_wrap): Add check on pseudo
register.
(ira): Add target specific PIC register initialization.
(do_reload): Keep PIC pseudo register.
* lra-assigns.c (spill_for): Add checks on pseudo register.
* lra-constraints.c (contains_symbol_ref_p): New.
(lra_constraints): Enable lra risky transformations when PIC is pseudo
register.
* shrink-wrap.c (try_shrink_wrapping): Add check on pseudo register.
* target.def (use_pseudo_pic_reg): New.
(init_pic_reg): New.
gcc/testsuite/
PR target/8340
PR middle-end/47602
PR rtl-optimization/55458
* gcc.target/i386/pic-1.c: Remove dg-error as test should pass now.
* gcc.target/i386/pr55458.c: Likewise.
* gcc.target/i386/pr47602.c: New.
* gcc.target/i386/pr23098.c: Move to XFAIL.
From-SVN: r216154
|
|
This patch removes the target macro LIBGCC2_LONG_DOUBLE_TYPE_SIZE.
After recent changes, this macro was used in two ways in libgcc: to
determine the mode of long double in dfp-bit.h, and to determine
whether a particular mode has excess precision for use in complex
multiplication.
The former is concerned specifically with long double: it relates to
use of strtold for converting between decimal and binary floating
point. This is replaced by comparing __LDBL_MANT_DIG__ with the
appropriate __LIBGCC_*_MANT_DIG__ macro. The latter is replaced
__LIBGCC_*_EXCESS_PRECISION__ predefined macros.
Remarks:
* Comparing (__LDBL_MANT_DIG__ == __LIBGCC_XF_MANT_DIG__) is more
fragile than it looks; it's possible for XFmode to have 53-bit
mantissa (TARGET_96_ROUND_53_LONG_DOUBLE, on FreeBSD and
DragonFlyBSD 32-bit), in which case such a comparison would not
distinguish XFmode and DFmode as possible modes for long double.
Fortunately, no target supporting that form of XFmode also supports
long double = double (but if some target did, we'd need e.g. an
additional macro giving the exponent range of each mode).
Furthermore, this code doesn't actually get used for x86 (or any
other target with XFmode support), because x86 uses BID not DPD and
BID has its own conversion code (which handles conversions for both
XFmode and TFmode without needing to go via strtold). And FreeBSD
and DragonFlyBSD aren't among the targets with DFP support. So
while in principle this code is fragile and it's a deficiency that
it can't support both XFmode and TFmode at once (something that
can't be solved with the string conversion approach without libc
having TS 18661 functions such as strtof128), all these issues
should not be a problem in practice.
* If other cases of excess precision are supported in future, the code
for defining __LIBGCC_*_EXCESS_PRECISION__ may need updating.
Although the most likely such cases might not actually involve
excess precision for any mode used in libgcc - FLT_EVAL_METHOD being
32 to do _Float16 arithmetic on _Float32 should have the effect of
_Complex _Float16 arithmetic using __mulsc3 and __divsc3, rather
than currently nonexistent __mulhc3 and __divhc3 as in bug 63250 for
ARM.
* As has been noted in the context of simultaneous support for
__float128 and __ibm128 on Power, the semantics of macros such as
LONG_DOUBLE_TYPE_SIZE are problematic because they rely on a
poorly-defined precision value for floating-point modes (which seems
to be intended as the number of significant bits in the
representation, e.g. 80 for XFmode which may be either 12 or 16
bytes) uniquely identifying a mode (although defining an arbitrarily
different value for one of the modes you wish to distinguish may
work as a hack). It would be cleaner to have a target hook that
gives a machine mode directly for float, double and long double,
rather than going via these precision values. By eliminating all
use of these macros (FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE,
LONG_DOUBLE_TYPE_SIZE) from code built for the target, this patch
facilitates such a conversion to a hook (which I suppose would take
some suitable enum as an argument to identify which of the three
types to return a mode for).
(The issue of multiple type support for DFP conversions would apply
in that Power case.
<https://gcc.gnu.org/ml/gcc-patches/2014-07/msg01084.html> doesn't
seem to touch on it, but it would seem reasonable to punt on it
initially as hard to fix. There would also be the issue of getting
functions such as __powikf2, __mulkc3, __divkc3 defined, but that's
rather easier to address.)
Bootstrapped with no regressions on x86_64-unknown-linux-gnu.
gcc:
* doc/tm.texi.in (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove.
* doc/tm.texi: Regenerate.
* system.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Poison.
* config/alpha/alpha.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove.
* config/i386/i386-interix.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE):
Remove.
* config/i386/i386.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove.
* config/i386/rtemself.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove.
* config/ia64/ia64.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove.
* config/m68k/m68k.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove.
* config/m68k/netbsd-elf.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE):
Remove.
* config/mips/mips.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove.
* config/mips/n32-elf.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove.
* config/msp430/msp430.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove.
* config/rl78/rl78.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove.
* config/rs6000/rs6000.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove.
* config/rx/rx.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove.
* config/s390/s390.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove.
* config/sparc/freebsd.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove.
* config/sparc/linux.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove.
* config/sparc/linux64.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove.
* config/sparc/netbsd-elf.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE):
Remove.
gcc/c-family:
* c-cppbuiltin.c (c_cpp_builtins): Define
__LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
modes.
libgcc:
* dfp-bit.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove.
(__LIBGCC_XF_MANT_DIG__): Define if not already defined.
(LONG_DOUBLE_HAS_XF_MODE): Define in terms of
__LIBGCC_XF_MANT_DIG__.
(__LIBGCC_TF_MANT_DIG__): Define if not already defined.
(LONG_DOUBLE_HAS_TF_MODE): Define in terms of
__LIBGCC_TF_MANT_DIG__.
* libgcc2.c (NOTRUNC): Define in terms of
__LIBGCC_*_EXCESS_PRECISION__, not LIBGCC2_LONG_DOUBLE_TYPE_SIZE.
* libgcc2.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove.
From-SVN: r215491
|
|
gcc/ChangeLog:
* config/rs6000/rs6000.c (rs6000_loop_align_max_skip): Strengthen
param "label" from rtx to rtx_insn *.
* config/rx/rx.c (rx_max_skip_for_label): Likewise for param "lab"
and local "op".
* doc/tm.texi (TARGET_ASM_JUMP_ALIGN_MAX_SKIP): Autogenerated changes.
(TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP): Likewise.
(TARGET_ASM_LOOP_ALIGN_MAX_SKIP): Likewise.
(TARGET_ASM_LABEL_ALIGN_MAX_SKIP): Likewise.
* final.c (default_label_align_after_barrier_max_skip): Strengthen
param from rtx to rtx_insn *.
(default_loop_align_max_skip): Likewise.
(default_label_align_max_skip): Likewise.
(default_jump_align_max_skip): Likewise.
* target.def (label_align_after_barrier_max_skip): Likewise.
(loop_align_max_skip): Likewise.
(label_align_max_skip): Likewise.
(jump_align_max_skip): Likewise.
* targhooks.h (default_label_align_after_barrier_max_skip):
Likewise.
(default_loop_align_max_skip): Likewise.
(default_label_align_max_skip): Likewise.
(default_jump_align_max_skip): Likewise.
From-SVN: r215270
|
|
gcc/ChangeLog:
* config/arc/arc.c (arc_can_follow_jump): Strengthen both params
from const_rtx to const rtx_insn *. Update union members from rtx
to rtx_insn *.
* doc/tm.texi (TARGET_CAN_FOLLOW_JUMP): Autogenerated change.
* hooks.c (hook_bool_const_rtx_const_rtx_true): Rename to...
(hook_bool_const_rtx_insn_const_rtx_insn_true): ...this, and
strengthen both params from const_rtx to const rtx_insn *.
* hooks.h (hook_bool_const_rtx_const_rtx_true): Likewise.
(hook_bool_const_rtx_insn_const_rtx_insn_true): Likewise.
* reorg.c (follow_jumps): Strengthen param "jump" from rtx to
rtx_insn *.
* target.def (can_follow_jump): Strengthen both params from
const_rtx to const rtx_insn *, and update default implementation
from hook_bool_const_rtx_const_rtx_true to
hook_bool_const_rtx_insn_const_rtx_insn_true.
From-SVN: r215269
|
|
This patch removes the LIBGCC2_HAS_{SF,DF,XF,TF}_MODE target macros,
replacing them by predefines with -fbuilding-libgcc, together with a
target hook that can influence those predefines when needed.
The new default is that a floating-point mode is supported in libgcc
if (a) it passes the scalar_mode_supported_p hook (otherwise it's not
plausible for it to be supported in libgcc) and (b) it's one of those
four modes (since those are the modes for which libgcc hardcodes the
possibility of support). The target hook can override the default
choice (in either direction) for modes that pass
scalar_mode_supported_p (although overriding in the direction of
returning true when the default would return false only makes sense if
all relevant functions are specially defined in libgcc for that
particular target).
The previous default settings depended on various settings such as
LIBGCC2_LONG_DOUBLE_TYPE_SIZE, as well as targets defining the above
target macros if the default wasn't correct.
The default scalar_mode_supported_p only declares a floating-point
mode to be supported if it matches one of float / double / long
double. This means that in most cases where a mode is only supported
conditionally in libgcc (TFmode only supported if it's the mode of
long double, most commonly), the default gets things right. Overrides
were needed in the following cases:
* SFmode would always have been supported in libgcc (the condition was
BITS_PER_UNIT == 8, true for all current targets), but pdp11
defaults to 64-bit float, and in that case SFmode would fail
scalar_mode_supported_p. I don't know if libgcc actually built for
pdp11 (and the port may well no longer be being used), but this
patch adds a scalar_mode_supported_p hook to it to ensure SFmode is
treated as supported.
* Certain i386 and ia64 targets need the new hook to match the
existing cases for when XFmode or TFmode support is present in
libgcc. For i386, the hook can always declare XFmode to be
supported - the cases where it's not are the cases where long double
is TFmode, in which case XFmode fails scalar_mode_supported_p[*] -
but TFmode support needs to be conditional. (And of the targets not
defining LIBGCC2_HAS_TF_MODE before this patch, some defined
LONG_DOUBLE_TYPE_SIZE to 64, so ensuring LIBGCC2_HAS_TF_MODE would
always be false, while others did not define it, so allowing it to
be true in the -mlong-double-128 case. This patch matches that
logic, although I suspect all the latter targets would have been
broken if you tried to enable -mlong-double-128 by default, for lack
of the soft-fp TFmode support in libgcc, which is separately
configured.)
[*] I don't know if it's deliberate not to support __float80 at all
with -mlong-double-128.
In order to implement the default version of the new hook,
insn-modes.h was made to contain macros such as HAVE_TFmode for each
machine mode, so the default hook can contain conditionals on whether
XFmode and TFmode exist (to match the hardcoding of a list of modes in
libgcc). This is also used in fortran/trans-types.c; previously it
had a conditional on defined(LIBGCC2_HAS_TF_MODE) (a bit dubious,
since it ignored the value of the macro), which is replaced by testing
defined(HAVE_TFmode), in conjunction with requiring
targetm.libgcc_floating_mode_supported_p.
(Fortran is testing something stronger than that hook: not only is
libgcc support required, but also libm or equivalent. Thus, it has a
test for ENABLE_LIBQUADMATH_SUPPORT in the case that the mode is
TFmode and that's not the same as any of the three standard types.
The old and new tests are intended to accept exactly the same set of
modes for all targets.)
Apart from the four target macros eliminated by this patch, it gets us
closer to eliminating LIBGCC2_LONG_DOUBLE_TYPE_SIZE as well, though a
few more places using that macro need changing first.
Bootstrapped with no regressions on x86_64-unknown-linux-gnu; also
built cc1 for crosses to ia64-elf and pdp11-none as a minimal test of
changes for those targets.
gcc:
* target.def (libgcc_floating_mode_supported_p): New hook.
* targhooks.c (default_libgcc_floating_mode_supported_p): New
function.
* targhooks.h (default_libgcc_floating_mode_supported_p): Declare.
* doc/tm.texi.in (LIBGCC2_HAS_DF_MODE, LIBGCC2_HAS_XF_MODE)
(LIBGCC2_HAS_TF_MODE): Remove.
(TARGET_LIBGCC_FLOATING_MODE_SUPPORTED_P): New @hook.
* doc/tm.texi: Regenerate.
* genmodes.c (emit_insn_modes_h): Define HAVE_%smode for each
machine mode.
* system.h (LIBGCC2_HAS_SF_MODE, LIBGCC2_HAS_DF_MODE)
(LIBGCC2_HAS_XF_MODE, LIBGCC2_HAS_TF_MODE): Poison.
* config/i386/cygming.h (LIBGCC2_HAS_TF_MODE): Remove.
* config/i386/darwin.h (LIBGCC2_HAS_TF_MODE): Remove.
* config/i386/djgpp.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Define.
* config/i386/dragonfly.h (LIBGCC2_HAS_TF_MODE): Remove.
* config/i386/freebsd.h (LIBGCC2_HAS_TF_MODE): Remove.
* config/i386/gnu-user-common.h (LIBGCC2_HAS_TF_MODE): Remove.
* config/i386/i386-interix.h (IX86_NO_LIBGCC_TFMODE): Define.
* config/i386/i386.c (ix86_libgcc_floating_mode_supported_p): New
function.
(TARGET_LIBGCC_FLOATING_MODE_SUPPORTED_P): Define.
* config/i386/i386elf.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Define.
* config/i386/lynx.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Define.
* config/i386/netbsd-elf.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Define.
* config/i386/netbsd64.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Define.
* config/i386/nto.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Define.
* config/i386/openbsd.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Define.
* config/i386/openbsdelf.h (LIBGCC2_HAS_TF_MODE): Remove.
* config/i386/rtemself.h (IX86_NO_LIBGCC_TFMODE): Define.
* config/i386/sol2.h (LIBGCC2_HAS_TF_MODE): Remove.
* config/i386/vx-common.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Define.
* config/ia64/elf.h (IA64_NO_LIBGCC_TFMODE): Define.
* config/ia64/freebsd.h (IA64_NO_LIBGCC_TFMODE): Define.
* config/ia64/hpux.h (LIBGCC2_HAS_XF_MODE, LIBGCC2_HAS_TF_MODE):
Remove.
* config/ia64/ia64.c (TARGET_LIBGCC_FLOATING_MODE_SUPPORTED_P):
New macro.
(ia64_libgcc_floating_mode_supported_p): New function.
* config/ia64/linux.h (LIBGCC2_HAS_TF_MODE): Remove.
* config/ia64/vms.h (IA64_NO_LIBGCC_XFMODE)
(IA64_NO_LIBGCC_TFMODE): Define.
* config/msp430/msp430.h (LIBGCC2_HAS_DF_MODE): Remove.
* config/pdp11/pdp11.c (TARGET_SCALAR_MODE_SUPPORTED_P): New
macro.
(pdp11_scalar_mode_supported_p): New function.
* config/rl78/rl78.h (LIBGCC2_HAS_DF_MODE): Remove.
* config/rx/rx.h (LIBGCC2_HAS_DF_MODE): Remove.
gcc/c-family:
* c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
macros for floating-point modes.
gcc/fortran:
* trans-types.c (gfc_init_kinds): Check
targetm.libgcc_floating_mode_supported_p for floating-point
modes. Check HAVE_TFmode instead of LIBGCC2_HAS_TF_MODE.
libgcc:
* libgcc2.h (LIBGCC2_HAS_SF_MODE): Define using
__LIBGCC_HAS_SF_MODE__.
(LIBGCC2_HAS_DF_MODE): Define using __LIBGCC_HAS_DF_MODE__.
(LIBGCC2_HAS_XF_MODE): Define using __LIBGCC_HAS_XF_MODE__.
(LIBGCC2_HAS_TF_MODE): Define using __LIBGCC_HAS_TF_MODE__.
* config/libbid/bid_gcc_intrinsics.h
(LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Do not define.
(LIBGCC2_HAS_XF_MODE): Define using __LIBGCC_HAS_XF_MODE__.
(LIBGCC2_HAS_TF_MODE): Define using __LIBGCC_HAS_TF_MODE__.
* fixed-bit.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Do not define.
(LIBGCC2_HAS_SF_MODE): Define using __LIBGCC_HAS_SF_MODE__.
(LIBGCC2_HAS_DF_MODE): Define using __LIBGCC_HAS_DF_MODE__.
From-SVN: r215215
|
|
gcc:
* config/i386/cygming.h (TF_SIZE): Remove.
* config/i386/darwin.h (TF_SIZE): Remove.
* config/i386/dragonfly.h (TF_SIZE): Remove.
* config/i386/freebsd.h (TF_SIZE): Remove.
* config/i386/gnu-user-common.h (TF_SIZE): Remove.
* config/i386/openbsdelf.h (TF_SIZE): Remove.
* config/i386/sol2.h (TF_SIZE): Remove.
* config/ia64/hpux.h (XF_SIZE, TF_SIZE): Remove.
* config/ia64/linux.h (TF_SIZE): Remove.
* doc/tm.texi.in (SF_SIZE, DF_SIZE, XF_SIZE, TF_SIZE): Remove.
* doc/tm.texi: Regenerate.
* system.h (SF_SIZE, DF_SIZE, XF_SIZE, TF_SIZE): Poison.
gcc/c-family:
* c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
digits of floating-point modes if -fbuilding-libgcc.
libgcc:
* libgcc2.c (SF_SIZE): Change all uses to __LIBGCC_SF_MANT_DIG__.
(DF_SIZE): Change all uses to __LIBGCC_DF_MANT_DIG__.
(XF_SIZE): Change all uses to __LIBGCC_XF_MANT_DIG__.
(TF_SIZE): Change all uses to __LIBGCC_TF_MANT_DIG__.
* libgcc2.h (SF_SIZE): Change to __LIBGCC_SF_MANT_DIG__. Give
error if not defined and LIBGCC2_HAS_SF_MODE is defined.
(DF_SIZE): Change to __LIBGCC_DF_MANT_DIG__. Give error if not
defined and LIBGCC2_HAS_DF_MODE is defined.
(XF_SIZE): Change to __LIBGCC_XF_MANT_DIG__. Give error if not
defined and LIBGCC2_HAS_XF_MODE is defined.
(TF_SIZE): Change to __LIBGCC_TF_MANT_DIG__. Give error if not
defined and LIBGCC2_HAS_TF_MODE is defined.
From-SVN: r215014
|
|
gcc:
* defaults.h (LARGEST_EXPONENT_IS_NORMAL, ROUND_TOWARDS_ZERO):
Remove.
* doc/tm.texi.in (ROUND_TOWARDS_ZERO, LARGEST_EXPONENT_IS_NORMAL):
Remove.
* doc/tm.texi: Regenerate.
* system.h (LARGEST_EXPONENT_IS_NORMAL, ROUND_TOWARDS_ZERO):
Poison.
* config/arm/arm.h (LARGEST_EXPONENT_IS_NORMAL): Remove.
* config/cris/cris.h (__make_dp): Remove.
libgcc:
* fp-bit.c (pack_d, unpack_d): Remove LARGEST_EXPONENT_IS_NORMAL
and ROUND_TOWARDS_ZERO conditionals.
From-SVN: r215013
|
|
gcc/
* target.def (TARGET_DWARF_FRAME_REG_MODE): New target hook.
* targhooks.c (default_dwarf_frame_reg_mode): New function.
* targhooks.h (default_dwarf_frame_reg_mode): New prototype.
* doc/tm.texi.in (TARGET_DWARF_FRAME_REG_MODE): Document.
* doc/tm.texi: Regenerate.
* dwarf2cfi.c (expand_builtin_init_dwarf_reg_sizes): Abstract mode
selection logic to default_dwarf_frame_reg_mode.
From-SVN: r214898
|
|
gcc/
2014-08-27 David Malcolm <dmalcolm@redhat.com>
* target.def (unwind_emit): Strengthen param "insn" from rtx to
rtx_insn *.
(final_postscan_insn): Likewise.
(adjust_cost): Likewise.
(adjust_priority): Likewise.
(variable_issue): Likewise.
(macro_fusion_pair_p): Likewise.
(dfa_post_cycle_insn): Likewise.
(first_cycle_multipass_dfa_lookahead_guard): Likewise.
(first_cycle_multipass_issue): Likewise.
(dfa_new_cycle): Likewise.
(adjust_cost_2): Likewise for params "insn" and "dep_insn".
(speculate_insn): Likewise for param "insn".
(gen_spec_check): Likewise for params "insn" and "label".
(get_insn_spec_ds): Likewise for param "insn".
(get_insn_checked_ds): Likewise.
(dispatch_do): Likewise.
(dispatch): Likewise.
(cannot_copy_insn_p): Likewise.
(invalid_within_doloop): Likewise.
(legitimate_combined_insn): Likewise.
(needed): Likewise.
(after): Likewise.
* doc/tm.texi: Automatically updated to reflect changes to
target.def.
* haifa-sched.c (choose_ready): Convert NULL_RTX to NULL when
working with insn.
(schedule_block): Likewise.
(sched_init): Likewise.
(sched_speculate_insn): Strengthen param "insn" from rtx to
rtx_insn *.
(ready_remove_first_dispatch): Convert NULL_RTX to NULL when
working with insn.
* hooks.c (hook_bool_rtx_true): Rename to...
hook_bool_rtx_insn_true): ...this, and strengthen first param from
rtx to rtx_insn *.
(hook_constcharptr_const_rtx_null): Rename to...
(hook_constcharptr_const_rtx_insn_null): ...this, and strengthen
first param from const_rtx to const rtx_insn *.
(hook_bool_rtx_int_false): Rename to...
(hook_bool_rtx_insn_int_false): ...this, and strengthen first
param from rtx to rtx_insn *.
(hook_void_rtx_int): Rename to...
(hook_void_rtx_insn_int): ...this, and strengthen first param from
rtx to rtx_insn *.
* hooks.h (hook_bool_rtx_true): Rename to...
(hook_bool_rtx_insn_true): ...this, and strengthen first param from
rtx to rtx_insn *.
(hook_bool_rtx_int_false): Rename to...
(hook_bool_rtx_insn_int_false): ...this, and strengthen first
param from rtx to rtx_insn *.
(hook_void_rtx_int): Rename to...
(hook_void_rtx_insn_int): ...this, and strengthen first param from
rtx to rtx_insn *.
(hook_constcharptr_const_rtx_null): Rename to...
(hook_constcharptr_const_rtx_insn_null): ...this, and strengthen
first param from const_rtx to const rtx_insn *.
* sched-deps.c (sched_macro_fuse_insns): Strengthen param "insn"
and local "prev" from rtx to rtx_insn *.
* sched-int.h (sched_speculate_insn): Strengthen first param from
rtx to rtx_insn *.
* sel-sched.c (create_speculation_check): Likewise for local "label".
* targhooks.c (default_invalid_within_doloop): Strengthen param
"insn" from const_rtx to const rtx_insn *.
* targhooks.h (default_invalid_within_doloop): Strengthen param
from const_rtx to const rtx_insn *.
* config/alpha/alpha.c (alpha_cannot_copy_insn_p): Likewise.
(alpha_adjust_cost): Likewise for params "insn", "dep_insn".
* config/arc/arc.c (arc_sched_adjust_priority): Likewise for param
"insn".
(arc_invalid_within_doloop): Likewise, with const.
* config/arm/arm.c (arm_adjust_cost): Likewise for params "insn", "dep".
(arm_cannot_copy_insn_p): Likewise for param "insn".
(arm_unwind_emit): Likewise.
* config/bfin/bfin.c (bfin_adjust_cost): Likewise for params "insn",
"dep_insn".
* config/c6x/c6x.c (c6x_dfa_new_cycle): Likewise for param "insn".
(c6x_variable_issue): Likewise. Removed now-redundant checked
cast.
(c6x_adjust_cost): Likewise for params "insn", "dep_insn".
* config/epiphany/epiphany-protos.h (epiphany_mode_needed):
Likewise for param "insn".
(epiphany_mode_after): Likewise.
* config/epiphany/epiphany.c (epiphany_adjust_cost): Likewise for
params "insn", "dep_insn".
(epiphany_mode_needed): Likewise for param "insn".
(epiphany_mode_after): Likewise.
* config/i386/i386-protos.h (i386_pe_seh_unwind_emit): Likewise.
* config/i386/i386.c (ix86_legitimate_combined_insn): Likewise.
(ix86_avx_u128_mode_needed): Likewise.
(ix86_i387_mode_needed): Likewise.
(ix86_mode_needed): Likewise.
(ix86_avx_u128_mode_after): Likewise.
(ix86_mode_after): Likewise.
(ix86_adjust_cost): Likewise for params "insn", "dep_insn".
(ix86_macro_fusion_pair_p): Likewise for params "condgen", "condjmp".
(ix86_adjust_priority): Likewise for param "insn".
(core2i7_first_cycle_multipass_issue): Likewise for param "insn".
(do_dispatch): Likewise.
(has_dispatch): Likewise.
* config/i386/winnt.c (i386_pe_seh_unwind_emit): Likewise.
* config/ia64/ia64.c (TARGET_INVALID_WITHIN_DOLOOP): Update to
reflect renaming of default hook implementation from
hook_constcharptr_const_rtx_null to
hook_constcharptr_const_rtx_insn_null.
(ia64_adjust_cost_2): Strengthen params "insn", "dep_insn" from
rtx to rtx_insn *.
(ia64_variable_issue): Likewise for param "insn".
(ia64_first_cycle_multipass_dfa_lookahead_guard): Likewise.
(ia64_dfa_new_cycle): Likewise.
(ia64_get_insn_spec_ds): Likewise.
(ia64_get_insn_checked_ds): Likewise.
(ia64_speculate_insn): Likewise.
(ia64_gen_spec_check): Likewise for params "insn", "label".
(ia64_asm_unwind_emit): Likewise for param "insn".
* config/m32r/m32r.c (m32r_adjust_priority): Likewise.
* config/m68k/m68k.c (m68k_sched_adjust_cost): Likewise for params
"insn", "def_insn".
(m68k_sched_variable_issue): Likewise for param "insn".
* config/mep/mep.c (mep_adjust_cost): Likewise for params "insn",
"def_insn".
* config/microblaze/microblaze.c (microblaze_adjust_cost):
Likewise for params "insn", "dep".
* config/mips/mips.c (mips_adjust_cost): Likewise.
(mips_variable_issue): Likewise for param "insn".
(mips_final_postscan_insn): Likewise.
* config/mn10300/mn10300.c (mn10300_adjust_sched_cost): Likewise
for params "insn", "dep".
* config/pa/pa.c (pa_adjust_cost): Likewise for params "insn",
"dep_insn".
(pa_adjust_priority): Likewise for param "insn".
* config/picochip/picochip.c (picochip_sched_adjust_cost):
Likewise for params "insn", "dep_insn".
* config/rs6000/rs6000.c (rs6000_variable_issue_1): Likewise for
param "insn".
(rs6000_variable_issue): Likewise.
(rs6000_adjust_cost): Likewise for params "insn", "dep_insn".
(rs6000_debug_adjust_cost): Likewise.
(rs6000_adjust_priority): Likewise for param "insn".
(rs6000_use_sched_lookahead_guard): Likewise.
(get_next_active_insn): Likewise for return type and both params.
(redefine_groups): Likewise for params "prev_head_insn", "tail"
and locals "insn", "next_insn".
(pad_groups): Likewise.
* config/s390/s390.c (s390_adjust_priority): Likewise for param
"insn".
(s390_cannot_copy_insn_p): Likewise.
(s390_sched_variable_issue): Likewise for third param, eliminating
checked cast.
(TARGET_INVALID_WITHIN_DOLOOP): Update to reflect renaming of
default hook implementation from hook_constcharptr_const_rtx_null
to hook_constcharptr_const_rtx_insn_null.
* config/sh/sh.c (sh_cannot_copy_insn_p): Strengthen param "insn"
from rtx to rtx_insn *.
(sh_adjust_cost): Likewise for params "insn", "dep_insn".
(sh_variable_issue): Likewise for param "insn".
(sh_dfa_new_cycle): Likewise.
(sh_mode_needed): Likewise.
(sh_mode_after): Likewise.
* config/sparc/sparc.c (supersparc_adjust_cost): Likewise for
params "insn", "dep_insn".
(hypersparc_adjust_cost): Likewise.
(sparc_adjust_cost): Likewise.
* config/spu/spu.c (spu_sched_variable_issue): Likewise for third
param, eliminated checked cast.
(spu_sched_adjust_cost): Likewise for first and third params.
* config/tilegx/tilegx.c (tilegx_sched_adjust_cost): Strengthen
params "insn" and "dep_insn" from rtx to rtx_insn *.
* config/tilepro/tilepro.c (tilepro_sched_adjust_cost): Likewise.
From-SVN: r214584
|
|
gcc/
* target.def (reorder): Strengthen param "ready" of this DEFHOOK
from rtx * to rtx_insn **.
(reorder2): Likewise.
(dependencies_evaluation_hook): Strengthen params "head", "tail"
from rtx to rtx_insn *.
* doc/tm.texi: Update mechanically for above change to target.def.
* sched-int.h (note_list): Strengthen this variable from rtx to
rtx_insn *.
(remove_notes): Likewise for both params.
(restore_other_notes): Likewise for return type and first param.
(struct ready_list): Strengthen field "vec" from rtx * to
rtx_insn **.
(struct dep_replacement): Strenghten field "insn" from rtx to
rtx_insn *.
(struct deps_desc): Likewise for fields "last_debug_insn",
"last_args_size".
(struct haifa_sched_info): Likewise for callback field
"can_schedule_ready_p"'s param, for first param of "new_ready"
callback field, for both params of "rank" callback field, for
first field of "print_insn" callback field (with a const), for
both params of "contributes_to_priority" callback, for param
of "insn_finishes_block_p" callback, for fields "prev_head",
"next_tail", "head", "tail", for first param of "add_remove_insn"
callback, for first param of "begin_schedule_ready" callback, for
both params of "begin_move_insn" callback, and for second param
of "advance_target_bb" callback.
(add_dependence): Likewise for params 1 and 2.
(sched_analyze): Likewise for params 2 and 3.
(deps_analyze_insn): Likewise for param 2.
(ready_element): Likewise for return type.
(ready_lastpos): Strengthen return type from rtx * to rtx_insn **.
(try_ready): Strenghten param from rtx to rtx_insn *.
(sched_emit_insn): Likewise for return type.
(record_delay_slot_pair): Likewise for params 1 and 2.
(add_delay_dependencies): Likewise for param.
(contributes_to_priority): Likewise for both params.
(find_modifiable_mems): Likewise.
* config/arm/arm.c (cortexa7_sched_reorder): Strengthen param
"ready" from rtx * to rtx_insn **. Strengthen locals "insn",
"first_older_only_insn" from rtx to rtx_insn *.
(arm_sched_reorder): Strengthen param "ready" from rtx * to
rtx_insn **.
* config/c6x/c6x.c (struct c6x_sched_context): Strengthen field
"last_scheduled_iter0" from rtx to rtx_insn *.
(init_sched_state): Replace use of NULL_RTX with NULL for insn.
(c6x_sched_reorder_1): Strengthen param "ready" and locals
"e_ready", "insnp" from rtx * to rtx_insn **. Strengthen local
"insn" from rtx to rtx_insn *.
(c6x_sched_reorder): Strengthen param "ready" from rtx * to
rtx_insn **.
(c6x_sched_reorder2): Strengthen param "ready" and locals
"e_ready", "insnp" from rtx * to rtx_insn **. Strengthen local
"insn" from rtx to rtx_insn *.
(c6x_variable_issue): Add a checked cast when assigning from insn
to ss.last_scheduled_iter0.
(split_delayed_branch): Strengthen param "insn" and local "i1"
from rtx to rtx_insn *.
(split_delayed_nonbranch): Likewise.
(undo_split_delayed_nonbranch): Likewise for local "insn".
(hwloop_optimize): Likewise for locals "seq", "insn", "prev",
"entry_after", "end_packet", "head_insn", "tail_insn",
"new_insns", "last_insn", "this_iter", "prev_stage_insn".
Strengthen locals "orig_vec", "copies", "insn_copies" from rtx *
to rtx_insn **. Remove now-redundant checked cast on last_insn,
but add a checked cast on loop->start_label. Consolidate calls to
avoid assigning result of gen_spkernel to "insn", now an
rtx_insn *.
* config/i386/i386.c (do_reorder_for_imul): Strengthen param
"ready" from rtx * to rtx_insn **. Strengthen local "insn" from
rtx to rtx_insn *.
(swap_top_of_ready_list): Strengthen param "ready" from rtx * to
rtx_insn **. Strengthen locals "top", "next" from rtx to
rtx_insn *.
(ix86_sched_reorder): Strengthen param "ready" from rtx * to
rtx_insn **. Strengthen local "insn" from rtx to rtx_insn *.
(add_parameter_dependencies): Strengthen params "call", "head" and
locals "insn", "last", "first_arg" from rtx to rtx_insn *.
(avoid_func_arg_motion): Likewise for params "first_arg", "insn".
(add_dependee_for_func_arg): Likewise for param "arg" and local
"insn".
(ix86_dependencies_evaluation_hook): Likewise for params "head",
"tail" and locals "insn", "first_arg".
* config/ia64/ia64.c (ia64_dependencies_evaluation_hook): Likewise
for params "head", "tail" and locals "insn", "next", "next_tail".
(ia64_dfa_sched_reorder): Strengthen param "ready" and locals
"e_ready", "insnp" from rtx * to rtx_insn **. Strengthen locals
"insn", "lowest", "highest" from rtx to rtx_insn *.
(ia64_sched_reorder): Strengthen param "ready" from rtx * to
rtx_insn **.
(ia64_sched_reorder2): Likewise.
* config/mep/mep.c (mep_find_ready_insn): Strengthen return type
and local "insn" from rtx to rtx_insn *. Strengthen param "ready"
from rtx * to rtx_insn **.
(mep_move_ready_insn): Strengthen param "ready" from rtx * to
rtx_insn **.
(mep_print_sched_insn): Strengthen param "insn" from rtx to
rtx_insn *.
(mep_sched_reorder): Strengthen param "ready" from rtx * to
rtx_insn **. Strengthen locals "core_insn", "cop_insn" from rtx
to rtx_insn *.
* config/mips/mips.c (mips_promote_ready): Strengthen param "ready"
from rtx * to rtx_insn **. Strengthen local "new_head" from rtx
to rtx_insn *.
(mips_maybe_swap_ready): Strengthen param "ready" from rtx * to
rtx_insn **. Strengthen local "temp" from rtx to rtx_insn *.
(mips_macc_chains_reorder): Strengthen param "ready" from rtx * to
rtx_insn **.
(vr4130_reorder): Likewise.
(mips_74k_agen_reorder): Likewise. Strengthen local "insn" from
rtx to rtx_insn *.
(mips_sched_reorder_1): Strengthen param "ready" from rtx * to
rtx_insn **.
(mips_sched_reorder): Likewise.
(mips_sched_reorder2): Likewise.
* config/picochip/picochip.c (picochip_sched_reorder): Likewise.
* config/rs6000/rs6000.c (rs6000_sched_reorder): Likewise.
Strengthen local "tmp" from rtx to rtx_insn *.
(rs6000_sched_reorder2): Likewise.
* config/s390/s390.c (s390_z10_prevent_earlyload_conflicts):
Likewise. Update sizeof(rtx) to sizeof(rtx_insn *) in memmove.
(s390_sched_reorder): Strengthen param "ready" from rtx * to
rtx_insn **. Strengthen local "tmp" from rtx to rtx_insn *.
* config/sh/sh.c (rank_for_reorder): Strengthen locals "tmp",
"tmp2" from rtx to rtx_insn *.
(swap_reorder): Strengthen param "a" from rtx * to rtx_insn **.
Strengthen local "insn" from rtx to rtx_insn *.
(ready_reorder): Strengthen param "ready" from rtx * to
rtx_insn **. Update sizeof(rtx) to sizeof(rtx_insn *) in qsort.
(sh_reorder): Strengthen param "ready" from rtx * to rtx_insn **.
(sh_reorder2): Likewise.
* config/spu/spu.c (spu_sched_reorder): Likewise. Strengthen
local "insn" from rtx to rtx_insn *.
* haifa-sched.c (note_list): Strengthen this variable from rtx to
rtx_insn *.
(scheduled_insns): Strengthen this variable from vec<rtx> to
vec<rtx_insn *>.
(set_modulo_params): Likewise for locals "i1", "i2".
(record_delay_slot_pair): Likewise for params "i1", "i2".
(add_delay_dependencies): Likewise for param "insn".
(cond_clobbered_p): Likewise.
(recompute_todo_spec): Likewise for local "prev".
(last_scheduled_insn): Likewise for this variable.
(nonscheduled_insns_begin): Likewise.
(model_set_excess_costs): Strengthen param "insns" from rtx * to
rtx_insn **.
(rank_for_schedule): Strengthen locals "tmp", "tmp2" from rtx to
rtx_insn *.
(swap_sort): Strengthen param "a" from rtx * to rtx_insn **.
Strengthen local "insn" from rtx to rtx_insn *.
(queue_insn): Strengthen param "insn" from rtx to rtx_insn *.
(ready_lastpos): Strengthen return type from rtx * to rtx_insn **.
(ready_add): Strengthen param "insn" from rtx to rtx_insn *.
(ready_remove_first): Likewise for return type and local "t".
(ready_element): Likewise for return type.
(ready_remove): Likewise for return type and local "t".
(ready_sort): Strengthen local "first" from rtx * to rtx_insn **.
(check_clobbered_conditions): Strengthen local "x" from rtx to
rtx_insn *, adding a checked cast.
(schedule_insn): Likewise for param "insn".
(remove_notes): Likewise for params "head", "tail" and locals
"next_tail", "insn", "next".
(struct haifa_saved_data): Likewise for fields
"last_scheduled_insn", "nonscheduled_insns_begin".
(save_backtrack_point): Update for change to field "vec" of
struct ready_list.
(toggle_cancelled_flags): Strengthen local "first" from rtx * to
rtx_insn **.
(restore_last_backtrack_point): Likewise. Strengthen local "insn"
from rtx to rtx_insn *
(resolve_dependencies): Strengthen param "insn" from rtx to
rtx_insn *
(restore_other_notes): Likewise for return type, for param "head"
and local "note_head".
(undo_all_replacements): Likewise for local "insn".
(first_nonscheduled_insn): Likewise for return type and local "insn".
(queue_to_ready): Likewise for local "insn", adding checked casts.
(early_queue_to_ready): Likewise for local "insn".
(debug_ready_list_1): Strengthen local "p" from rtx * to
rtx_insn **.
(move_insn): Strengthen param "insn" and local "note" from rtx to
rtx_insn *
(insn_finishes_cycle_p): Likewise for param "insn".
(max_issue): Likewise for local "insn".
(choose_ready): Likewise. Strengthen param "insn_ptr" from rtx *
to rtx_insn **.
(commit_schedule): Strengthen param "prev_head" and local "insn"
from rtx to rtx_insn *
(prune_ready_list): Likewise for local "insn".
(schedule_block): Likewise for locals "prev_head", "head", "tail",
"skip_insn", "insn", "failed_insn", "x", adding a checked cast.
(set_priorities): Likewise for local "prev_head".
(try_ready): Likewise for param "next".
(fix_tick_ready): Likewise.
(change_queue_index): Likewise.
(sched_extend_ready_list): Update for change to field "vec" of
struct ready_list.
(generate_recovery_code): Strengthen param "insn" from rtx to
rtx_insn *.
(begin_speculative_block): Likewise.
(create_check_block_twin): Likewise for param "insn" and locals
"label", "check", "twin". Introduce local "check_pat" to avoid
"check" being used as a plain rtx before being used as an insn.
(fix_recovery_deps): Add a checked cast to rtx_insn * when
extracting elements from ready_list.
(sched_remove_insn): Strengthen param "insn" from rtx to
rtx_insn *.
(sched_emit_insn): Likewise for return type.
(ready_remove_first_dispatch): Likewise for return type and local
"insn".
* hw-doloop.c (discover_loop): Add a checked cast to rtx_insn *.
* modulo-sched.c (sms_print_insn): Strengthen from const_rtx to
const rtx_insn *.
* sched-deps.c (add_dependence): Strengthen params "con", "pro"
from rtx to rtx_insn *.
(add_dependence_list): Likewise for param "insn". Add a checked
cast.
(add_dependence_list_and_free): Strengthen param "insn" from rtx
to rtx_insn *. Strengthen param "list_p" from rtx * to
rtx_insn **.
(chain_to_prev_insn): Strengthen param "insn" and locals
"prec_nonnote", "i" from rtx to rtx_insn *.
(flush_pending_lists): Likewise for param "insn".
(cur_insn): Likewise for this variable.
(haifa_start_insn): Add a checked cast.
(note_dep): Strengthen param "e" from rtx to rtx_insn *.
(sched_analyze_reg): Likewise for param "insn".
(sched_analyze_1): Likewise.
(sched_analyze_2): Likewise. Add checked casts.
(sched_analyze_insn): Likewise. Also for local "prev".
(deps_analyze_insn): Likewise for param "insn".
(sched_analyze): Likewise for params "head", "tail" and local "insn".
(add_dependence_1): Likewise for params "insn", "elem".
(struct mem_inc_info): Likewise for fields "inc_insn", "mem_insn".
(parse_add_or_inc): Likewise for param "insn".
(find_inc): Likewise for local "inc_cand".
(find_modifiable_mems): Likewise for params "head", "tail" and
locals "insn", "next_tail".
* sched-ebb.c (init_ready_list): Likewise for local "insn".
(begin_schedule_ready): Likewise for param "insn".
(begin_move_insn): Likewise for params "insn" and "last".
(ebb_print_insn): Strengthen param "insn" from const_rtx to
const rtx_insn *.
(rank): Strengthen params "insn1", "insn2" from rtx to rtx_insn *.
(ebb_contributes_to_priority): Likewise for params "next", "insn".
(ebb_add_remove_insn): Likewise for param "insn".
(advance_target_bb): Likewise.
* sched-rgn.c (rgn_estimate_number_of_insns): Likewise for local
"insn".
(check_live): Likewise for param "insn".
(init_ready_list): Likewise for local "insn".
(can_schedule_ready_p): Likewise for param "insn".
(begin_schedule_ready): Likewise.
(new_ready): Likewise for param "next".
(rgn_print_insn): Likewise for param "insn".
(rgn_rank): Likewise for params "insn1", "insn2".
(contributes_to_priority): Likewise for params "next", "insn".
(rgn_insn_finishes_block_p): Likewise for param "insn".
(add_branch_dependences): Likewise for params "head", "tail" and
locals "insn", "last".
(rgn_add_remove_insn): Likewise for param "insn".
(advance_target_bb): Likewise.
* sel-sched-dump.c (sel_print_insn): Strengthen param "insn" from
const_rtx to const rtx_insn *.
* sel-sched-dump.h (sel_print_insn): Likewise.
* sel-sched-ir.c (advance_deps_context): Add a checked cast.
(deps_init_id): Likewise.
* sel-sched.c (convert_vec_av_set_to_ready): Likewise.
(invoke_reorder_hooks): Strengthen local "arr" from rtx * to
rtx_insn **.
From-SVN: r214481
|
|
* system.h (CALLER_SAVE_PROFITABLE): Poison.
* regs.h (CALLER_SAVE_PROFITABLE): Remove.
* doc/tm.texi.in (CALLER_SAVE_PROFITABLE): Remove.
* doc/tm.texi: Regenerate.
From-SVN: r214405
|
|
* mode-switching.c (struct bb_info): Add mode_out, mode_in caches.
(make_preds_opaque): Delete.
(clear_mode_bit, mode_bit_p, set_mode_bit): New macros.
(commit_mode_sets): New function.
(optimize_mode_switching): Handle current_mode to mode_switching_emit.
Process all modes at once.
* basic-block.h (pre_edge_lcm_avs): Declare.
* lcm.c (pre_edge_lcm_avs): Renamed from pre_edge_lcm.
Call clear_aux_for_edges. Fix comments.
(pre_edge_lcm): New wrapper function to call pre_edge_lcm_avs.
(pre_edge_rev_lcm): Idem.
* config/epiphany/epiphany.c (emit_set_fp_mode): Add prev_mode parameter.
* config/epiphany/epiphany-protos.h (emit_set_fp_mode): Idem.
* config/epiphany/resolve-sw-modes.c (pass_resolve_sw_modes::execute): Idem.
* config/i386/i386.c (x96_emit_mode_set): Idem.
* config/sh/sh.c (sh_emit_mode_set): Likewise. Handle PR toggle.
* config/sh/sh.md (toggle_pr): Defined if TARGET_FPU_SINGLE.
(fpscr_toggle) Disallow from delay slot.
* target.def (emit_mode_set): Add prev_mode parameter.
* doc/tm.texi: Regenerate.
From-SVN: r212230
|
|
2014-06-20 Tom de Vries <tom@codesourcery.com>
* target.def (call_fusage_contains_non_callee_clobbers): Update
definition.
* doc/tm.texi: Regenerate.
From-SVN: r211852
|
|
definition at -O0)
PR target/61300
* doc/tm.texi.in (INCOMING_REG_PARM_STACK_SPACE): Document.
* doc/tm.texi: Regenerate.
* function.c (INCOMING_REG_PARM_STACK_SPACE): Provide default.
Use throughout in place of REG_PARM_STACK_SPACE.
* config/rs6000/rs6000.c (rs6000_reg_parm_stack_space): Add
"incoming" param. Pass to rs6000_function_parms_need_stack.
(rs6000_function_parms_need_stack): Add "incoming" param, ignore
prototype_p when incoming. Use function decl when incoming
to handle K&R style functions.
* config/rs6000/rs6000.h (REG_PARM_STACK_SPACE): Adjust.
(INCOMING_REG_PARM_STACK_SPACE): Define.
From-SVN: r211296
|
|
* defaults.h (USE_MD_CONSTRAINTS, EXTRA_MEMORY_CONSTRAINT)
(EXTRA_ADDRESS_CONSTRAINT, DEFAULT_CONSTRAINT_LEN, CONSTRAINT_LEN)
(CONST_OK_FOR_CONSTRAINT_P, CONST_DOUBLE_OK_FOR_LETTER_P)
(REG_CLASS_FROM_CONSTRAINT, EXTRA_CONSTRAINT_STR): Delete definitions
in this file.
(REG_CLASS_FROM_LETTER, CONST_OK_FOR_LETTER_P)
(CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Move poising to...
* system.h: ...here and make it unconditional.
* target.def (conditional_register_usage): Mention
define_register_constraint instead of old-style constraint macros.
* doc/tm.texi.in: Remove documentation for old-style constraint macros.
* doc/tm.texi: Regenerate.
* genoutput.c: Remove USE_MD_CONSTRAINTS conditions and all code
protected by !USE_MD_CONSTRAINTS.
* config/frv/frv.md: Remove quote from old version of documentation.
* config/frv/frv.c (frv_conditional_register_usage): Likewise.
* config/m32r/m32r.c (easy_di_const, easy_df_const): Avoid mentioning
CONST_DOUBLE_OK_FOR_LETTER.
* config/sh/constraints.md: Likewise EXTRA_CONSTRAINT.
From-SVN: r211161
|
|
2014-05-23 Richard Biener <rguenther@suse.de>
* system.h: Define __STDC_FORMAT_MACROS before
including inttypes.h.
* hwint.h (HOST_WIDEST_INT, HOST_BITS_PER_WIDEST_INT,
HOST_WIDEST_INT_PRINT, HOST_WIDEST_INT_PRINT_DEC,
HOST_WIDEST_INT_PRINT_DEC_C, HOST_WIDEST_INT_PRINT_UNSIGNED,
HOST_WIDEST_INT_PRINT_HEX, HOST_WIDEST_INT_PRINT_DOUBLE_HEX,
HOST_WIDEST_INT_C): Remove.
(PRId64, PRIi64, PRIo64, PRIu64, PRIx64, PRIX64): Define
if C99 inttypes.h is not available.
* coretypes.h (gcov_type, gcov_type_unsigned): Use [u]int64_t.
* gcov-io.h (gcov_type, gcov_type_unsigned): Likewise.
* gcov-io.c (gcov_histo_index): Drop non-64bit hwi case.
* cfgloop.h (struct niter_desc): Use uint64_t for niter field.
* bitmap.c (struct bitmap_descriptor_d): Use uint64_t for counters.
(struct output_info): Likewise.
(print_statistics): Adjust.
(dump_bitmap_statistics): Likewise.
* bt-load.c (migrate_btr_defs): Print with PRId64.
* cfg.c (dump_edge_info, dump_bb_info): Likewise.
(MAX_SAFE_MULTIPLIER): Adjust.
* cfghooks.c (dump_bb_for_graph): Print with PRId64.
* cgraph.c (cgraph_redirect_edge_call_stmt_to_callee,
dump_cgraph_node): Likewise.
* final.c (dump_basic_block_info): Likewise.
* gcov-dump.c (tag_counters, tag_summary, dump_working_sets): Likewise.
* gcov.c (format_gcov): Likewise.
* ipa-cp.c (good_cloning_opportunity_p): Likewise. Use int64_t
for calculation.
(get_clone_agg_value): Use HOST_WIDE_INT for offset.
* ipa-inline.c (compute_max_insns): Use int64_t for calcuation.
(inline_small_functions, dump_overall_stats, dump_inline_stats):
Use PRId64 for dumping.
* ipa-profile.c (dump_histogram, ipa_profile): Likewise.
* ira-color.c (struct allocno_hard_regs): Use int64_t for cost.
(add_allocno_hard_regs): Adjust.
* loop-doloop.c (doloop_modify): Print using PRId64.
* loop-iv.c (inverse): Compute in uint64_t.
(determine_max_iter, iv_number_of_iterations): Likewise.
* loop-unroll.c (decide_peel_completely, decide_peel_simple):
Print using PRId64.
* lto-streamer-out.c (write_symbol): Use uint64_t.
* mcf.c (CAP_INFINITY): Use int64_t maximum.
(dump_fixup_edge, create_fixup_graph, cancel_negative_cycle,
find_max_flow, adjust_cfg_counts): Use int64_t and dump with PRId64.
* modulo-sched.c (const_iteration_count): Use int64_t.
(sms_schedule): Dump using PRId64.
* predict.c (dump_prediction): Likewise.
* pretty-print.h (pp_widest_integer): Remove.
* profile.c (get_working_sets, is_edge_inconsistent,
is_inconsistent, read_profile_edge_counts): Dump using PRId64.
* tree-pretty-print.c (pp_double_int): Remove case handling
HOST_BITS_PER_DOUBLE_INT == HOST_BITS_PER_WIDEST_INT.
* tree-ssa-math-opts.c (struct symbolic_number): Use uint64_t
and adjust users.
(pass_optimize_bswap::execute): Remove restriction on hosts.
* tree-streamer-in.c (streamer_alloc_tree): Use HOST_WIDE_INT.
* tree-streamer-out.c (streamer_write_tree_header): Likewise.
* tree.c (widest_int_cst_value): Remove.
* tree.h (widest_int_cst_value): Likewise.
* value-prof.c (dump_histogram_value): Print using PRId64.
* gengtype.c (main): Also inject int64_t.
* ggc-page.c (struct max_alignment): Use int64_t.
* alloc-pool.c (struct allocation_object_def): Likewise.
* ira-conflicts.c (build_conflict_bit_table): Use uint64_t
for computation.
* doc/tm.texi.in: Remove reference to HOST_WIDEST_INT.
* doc/tm.texi: Regenerated.
* gengtype-lex.l (IWORD): Handle [u]int64_t.
* config/sh/sh.c (expand_cbranchdi4): Use gcov_type.
* config/mmix/mmix-protos.h (mmix_intval, mmix_shiftable_wyde_value,
mmix_output_register_setting): Use [u]int64_t in prototypes.
* config/mmix/mmix.c (mmix_print_operand, mmix_output_register_setting,
mmix_shiftable_wyde_value, mmix_output_shiftvalue_op_from_str,
mmix_output_octa, mmix_output_shifted_value): Adjust.
(mmix_intval): Adjust. Remove unreachable case.
* config/mmix/mmix.md (*nonlocal_goto_receiver_expanded): Use
int64_t.
lto/
* lto.c (lto_parse_hex): Use int64_t.
(lto_resolution_read): Likewise.
From-SVN: r210931
|
|
* config/i386/i386.c (core2i7_first_cycle_multipass_filter_ready_try,)
(core2i7_first_cycle_multipass_begin,)
(core2i7_first_cycle_multipass_issue,)
(core2i7_first_cycle_multipass_backtrack): Update signature.
* config/ia64/ia64.c
(ia64_first_cycle_multipass_dfa_lookahead_guard_spec): Remove.
(ia64_first_cycle_multipass_dfa_lookahead_guard): Update signature.
(TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD_SPEC): Remove
hook definition.
(ia64_first_cycle_multipass_dfa_lookahead_guard): Merge logic from
ia64_first_cycle_multipass_dfa_lookahead_guard_spec. Update return
values.
* config/rs6000/rs6000.c (rs6000_use_sched_lookahead_guard): Update
return values.
* doc/tm.texi: Regenerate.
* doc/tm.texi.in
(TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD_SPEC): Remove.
* haifa-sched.c (ready_try): Make signed to allow negative values.
(rebug_ready_list_1): Update.
(choose_ready): Simplify.
(sched_extend_ready_list): Update.
From-SVN: r210747
|
|
2014-05-13 Christian Bruel <christian.bruel@st.com>
* target.def (mode_switching): New hook vector.
(mode_emit, mode_needed, mode_after, mode_entry): New hooks.
(mode_exit, modepriority_to_mode): Likewise.
* mode-switching.c (MODE_NEEDED, MODE_AFTER, MODE_ENTRY): Hookify.
(MODE_EXIT, MODE_PRIORITY_TO_MODE, EMIT_MODE_SET): Likewise.
(default_priority_to_mode): Define.
* targhooks.h (default_priority_to_mode): Declare.
* target.h: Include tm.h and hard-reg-set.h.
* doc/tm.texi.in (EMIT_MODE_SET, MODE_NEEDED, MODE_AFTER, MODE_ENTRY)
(MODE_EXIT, MODE_PRIORITY_TO_MODE): Delete and hookify.
* doc/tm.texi Regenerate.
* config/sh/sh.h (MODE_NEEDED, MODE_AFTER, MODE_ENTRY): Delete
(MODE_EXIT, MODE_PRIORITY_TO_MODE, EMIT_MODE_SET): Likewise.
* config/sh/sh.c (sh_emit_mode_set, sh_mode_priority): Hookify.
(sh_mode_needed, sh_mode_after, sh_mode_entry, sh_mode_exit): Likewise.
* config/i386/i386.h (MODE_NEEDED, MODE_AFTER, MODE_ENTRY): Delete
(MODE_EXIT, MODE_PRIORITY_TO_MODE, EMIT_MODE_SET): Likewise.
* config/i386/i386-protos.h (ix86_mode_needed, ix86_mode_after)
(ix86_mode_entrym, ix86_emit_mode_set): Remove external declaration.
* config/i386/i386.c (ix86_mode_needed, ix86_mode_after, ix86_mode_exit,
(ix86_mode_entry, ix86_mode_priority, ix86_emit_mode_set): Hookify.
* config/epiphany/epiphany.h (MODE_NEEDED, MODE_AFTER, MODE_ENTRY):
Delete
(MODE_EXIT, MODE_PRIORITY_TO_MODE, EMIT_MODE_SET): Likewise.
* config/sh/sh.h (MODE_NEEDED, MODE_AFTER, MODE_ENTRY): Delete
(MODE_EXIT, MODE_PRIORITY_TO_MODE, EMIT_MODE_SET): Likewise.
* config/sh/sh.c (sh4_emit_mode_set, sh4_mode_needed): Hookify.
(sh4_mode_after, sh4_mode_entry, sh4_mode_exit): Likewise.
* config/epiphany/epiphany-protos.h (epiphany_mode_needed)
(emit_set_fp_mode, epiphany_mode_entry_exit, epiphany_mode_after)
(epiphany_mode_priority_to_mode): Remove declaration.
* config/epiphany/epiphany.c (emit_set_fp_mode): Hookify.
(epiphany_mode_needed, epiphany_mode_priority_to_mode): Likewise.
(epiphany_mode_entry, epiphany_mode_exit, epiphany_mode_after):
Likewise.
(epiphany_mode_priority_to_mode): Change priority type. Hookify.
(epiphany_mode_needed, epiphany_mode_entry_exit): Hookify.
(epiphany_mode_after, epiphany_mode_entry, emit_set_fp_mode): Hookify.
From-SVN: r210354
|
|
2014-05-12 David Wohlferd <dw@LimeGreenSocks.com>
* doc/tm.texi: Remove reference to deleted macro.
* doc/tm.texi.in: Likewise.
From-SVN: r210330
|
|
From-SVN: r210113
|
|
2014-05-05 Radovan Obradovic <robradovic@mips.com>
Tom de Vries <tom@codesourcery.com>
* target.def (call_fusage_contains_non_callee_clobbers): New DEFHOOKPOD.
* doc/tm.texi.in (@node Stack and Calling): Add Miscellaneous Register
Hooks to @menu.
(@node Miscellaneous Register Hooks): New node.
(@hook TARGET_CALL_FUSAGE_CONTAINS_NON_CALLEE_CLOBBERS): New hook.
* doc/tm.texi: Regenerate.
Co-Authored-By: Tom de Vries <tom@codesourcery.com>
From-SVN: r210085
|
|
2014-05-05 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* target.def: Add new target hook.
* doc/tm.texi: Regenerate.
* targhooks.h (default_keep_leaf_when_profiled): Add prototype.
* targhooks.c (default_keep_leaf_when_profiled): New function.
* config/s390/s390.c (s390_keep_leaf_when_profiled): New function.
(TARGET_KEEP_LEAF_WHEN_PROFILED): Define.
2014-05-05 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* gcc.target/s390/leaf-profile.c: New testcase.
From-SVN: r210061
|
|
expression marco.
2014-02-26 Kito Cheng <kito@0xlab.org>
* defaults.h (HONOR_REG_ALLOC_ORDER): Change HONOR_REG_ALLOC_ORDER
to a C expression marco.
* ira-color.c (HONOR_REG_ALLOC_ORDER) : Ditto.
* config/arm/arm.h (HONOR_REG_ALLOC_ORDER): Ditto.
* config/nds32/nds32.h (HONOR_REG_ALLOC_ORDER): Ditto.
* doc/tm.texi (HONOR_REG_ALLOC_ORDER): Update document for
HONOR_REG_ALLOC_ORDER.
* doc/tm.texi.in (HONOR_REG_ALLOC_ORDER): Ditto.
From-SVN: r210000
|
|
emitted in the wrong order)
gcc:
PR rtl-optimization/60651
* mode-switching.c (optimize_mode_switching): Make sure to emit
sets of a lower numbered entity before sets of a higher numbered
entity to a mode of the same or lower priority.
When creating a seginfo for a basic block that starts with a code
label, move the insertion point past the code label.
(new_seginfo): Document and enforce requirement that
NOTE_INSN_BASIC_BLOCK only appears for empty blocks.
* doc/tm.texi.in: Document ordering constraint for emitted mode sets.
* doc/tm.texi: Regenerate.
gcc/testsuite:
PR rtl-optimization/60651
* gcc.target/epiphany/mode-switch.c: New test.
From-SVN: r209312
|
|
PR rtl-optimization/49847
* cse.c (fold_rtx) Handle case where cc0 setter and cc0 user
are in different blocks.
* doc/tm.texi (Condition Code Status): Update documention for
relative locations of cc0-setter and cc0-user.
PR rtl-optimization/49847
* g++.dg/pr49847.C: New test.
Co-Authored-By: Jeff Law <law@redhat.com>
From-SVN: r208203
|
|
From-SVN: r206289
|
|
2013-12-13 Kenneth Zadeck <zadeck@naturalbridge.com>
* config/arc/arc.h (BITS_PER_UNIT): Removed.
* config/bfin/bfin.h (BITS_PER_UNIT): Removed.
* config/lm32/lm32.h (BITS_PER_UNIT): Removed.
* config/m32c/m32c.h (BITS_PER_UNIT): Removed.
* config/microblaze/microblaze.h (BITS_PER_UNIT): Removed.
* config/picochip/picochip.h (BITS_PER_UNIT): Removed.
* config/spu/spu.h (BITS_PER_UNIT): Removed.
* defaults.h (BITS_PER_UNIT): Removed.
* config/i386/i386-modes.def (MAX_BITSIZE_MODE_ANY_INT): New.
* doc/rtl (BITS_PER_UNIT): Moved from tm.texi.
(MAX_BITSIZE_MODE_ANY_INT): Updated.
* doc/tm.texi (BITS_PER_UNIT): Removed.
* doc/tm.texi.in (BITS_PER_UNIT): Removed.
* genmodes.c (bits_per_unit, max_bitsize_mode_any_int): New.
(create_modes): Added code to set bits_per_unit and
max_bitsize_mode_any_int.
(emit_max_int): Changed code generation.
* mkconfig.sh: Added insn-modes.h.
From-SVN: r205964
|