Commit Graph

938 Commits

Author SHA1 Message Date
Jeff Law 6b1786aa65 re PR other/66259 (Combined gcc and binutils build from git-master fails, with gas/as-new not existing)
PR other/66259
	* config-ml.in: Reflects renaming of configure.in to configure.ac
	* configure: Likewise
	* configure.ac: Likewise

boehm-gc/

	PR other/66259
	* Makefile.direct: Reflects renaming of configure.in to configure.ac
	* Makefile.dist: Likewise
	* version.h: Likewise
	* doc/README: Likewise

config/

	PR other/66259
	* gettext.m4: Reflects renaming of configure.in to configure.ac
	* po.m4: Likewise
	* stdint.m4: Likewise
	* tcl.m4: Likewise

gcc/

	PR other/66259
	* acinclude.m4: Reflects renaming of configure.in to configure.ac
	* configure: Likewise
	* configure.ac: Likewise
	* doc/install.texi: Likewise
	* doc/tm.texi: Likewise
	* doc/tm.texi.in: Likewise

gcc/ada/

	PR other/66259
	* prj-nmsc.adb: Reflects renaming of configure.in to configure.ac
	* gcc-interface/Makefile.in: Likewise

intl/

	PR other/66259
	* configure: Reflects renaming of configure.in to configure.ac

libjava/

	PR other/66259
	* configure: Reflects renaming of configure.in to configure.ac

libjava/classpath

	PR other/66259
	* INSTALL: Reflects renaming of configure.in to configure.ac
	* ltconfig: Likewise
	* missing: Likewise
	* m4/ac_prog_javac.m4: Likewise
	* m4/ac_prog/javac_works.m4: Likewise
	* resource/META-INF/mimetypes.default: Likewise

libjava/libltdl

	PR other/66259
	* THREADS: Reflects renaming of configure.in to configure.ac

liboffloadmic/

	PR other/66259
	* configure: Reflects renaming of configure.in to configure.ac

From-SVN: r226183
2015-07-24 12:20:44 -06:00
Trevor Saunders 9e11bfef7a always define WORD_REGISTER_OPERATIONS
gcc/ChangeLog:

2015-07-08  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* defaults.h: Provide default for WORD_REGISTER_OPERATIONS.
	* config/alpha/alpha.h: Define WORD_REGISTER_OPERATIONS to 1.
	* config/arc/arc.h: Likewise.
	* config/arm/arm.h: Likewise.
	* config/bfin/bfin.h: Likewise.
	* config/epiphany/epiphany.h: Likewise.
	* config/frv/frv.h: Likewise.
	* config/ia64/ia64.h: Likewise.
	* config/iq2000/iq2000.h: Likewise.
	* config/lm32/lm32.h: Likewise.
	* config/m32r/m32r.h: Likewise.
	* config/mcore/mcore.h: Likewise.
	* config/mep/mep.h: Likewise.
	* config/microblaze/microblaze.h: Likewise.
	* config/mips/mips.h: Likewise.
	* config/mmix/mmix.h: Likewise.
	* config/mn10300/mn10300.h: Likewise.
	* config/nds32/nds32.h: Likewise.
	* config/nios2/nios2.h: Likewise.
	* config/pa/pa.h: Likewise.
	* config/rl78/rl78.h: Likewise.
	* config/sh/sh.h: Likewise.
	* config/sparc/sparc.h: Likewise.
	* config/stormy16/stormy16.h: Likewise.
	* config/tilegx/tilegx.h: Likewise.
	* config/tilepro/tilepro.h: Likewise.
	* config/v850/v850.h: Likewise.
	* config/xtensa/xtensa.h: Likewise.
	* doc/tm.texi: Regenerate.
	* doc/tm.texi.in: Adjust.
	* combine.c (simplify_set): Likewise.
	(simplify_comparison): Likewise.
	* expr.c (store_constructor): Likewise.
	* internal-fn.c (expand_arith_overflow): Likewise.
	* reload.c (push_reload): Likewise.
	(find_reloads): Likewise.
	(find_reloads_subreg_address): Likewise.
	* reload1.c (eliminate_regs_1): Likewise.
	* rtlanal.c (nonzero_bits1): Likewise.
	(num_sign_bit_copies1): Likewise.
	* simplify-rtx.c (simplify_truncation): Likewise.

From-SVN: r225597
2015-07-09 02:51:19 +00:00
Trevor Saunders 58f2ae18ff always define SHORT_IMMEDIATES_SIGN_EXTEND
gcc/ChangeLog:

2015-07-08  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* combine.c (update_rsp_from_reg_equal): Don't check if
	SHORT_IMMEDIATES_SIGN_EXTEND is defined.
	(reg_nonzero_bits_for_combine): Likewise.
	* config/alpha/alpha.h: Define SHORT_IMMEDIATES_SIGN_EXTEND to
	1.
	* config/frv/frv.h: Likewise.
	* config/lm32/lm32.h: Likewise.
	* config/mep/mep.h: Likewise.
	* config/mips/mips.h: Likewise.
	* config/rs6000/rs6000.h: Likewise.
	* config/sh/sh.h: Likewise.
	* config/tilegx/tilegx.h (enum reg_class): Likewise.
	* config/tilepro/tilepro.h: Likewise.
	* defaults.h: Add default for SHORT_IMMEDIATES_SIGN_EXTEND.
	* doc/tm.texi: Regenerate.
	* doc/tm.texi.in: Adjust.
	* rtlanal.c (nonzero_bits1): Likewise.

From-SVN: r225593
2015-07-09 02:50:07 +00:00
Alan Modra e548c9df07 target.def (rtx_costs): Remove "code" param, add "mode".
* target.def (rtx_costs): Remove "code" param, add "mode".
	* rtl.h (rtx_cost, get_full_rtx_cost): Update prototype.
	(set_src_cost, get_full_set_src_cost): Likewise.  Move later in file.
	(set_rtx_cost, get_full_set_rtx_cost): Move later in file.
	* rtlanal.c (rtx_cost): Add "mode" parameter.  Update targetm.rtx_costs
	call.  Track mode when given in rtx.
	(get_full_rtx_cost): Add "mode" parameter.  Update rtx_cost calls.
	(default_address_cost): Pass Pmode to rtx_cost.
	(insn_rtx_cost): Pass dest mode of set to set_src_cost.
	* cprop.c (try_replace_reg): Ensure set_rtx_cost is not called
	with NULL set.
	* cse.c (COST, COST_IN): Add MODE param.  Update all uses.
	(notreg_cost): Add mode param.  Use it.
	* gcse.c (want_to_gcse_p): Delete forward declaration.  Add
	mode param and pass to set_src_cost.  Update all calls.
	(hash_scan_set): Formatting.
	* hooks.c (hook_bool_rtx_int_int_int_intp_bool_false): Delete.
	(hook_bool_rtx_mode_int_int_intp_bool_false): New function.
	* hooks.h: Ditto.
	* expmed.c (init_expmed_one_conv, init_expmed_one_mode,
	init_expmed, expand_mult, mult_by_coeff_cost, expand_smod_pow2,
	emit_store_flag): Update set_src_cost and rtx_cost calls.
	* auto-inc-dec.c (attempt_change): Likewise.
	* calls.c (precompute_register_parameters): Likewise.
	* combine.c (expand_compound_operation, make_extraction,
	force_to_mode, distribute_and_simplify_rtx): Likewise.
	* dojump.c (prefer_and_bit_test): Likewise.
	* dse.c (find_shift_sequence): Likewise.
	* expr.c (compress_float_constant): Likewise.
	* fwprop.c (should_replace_address, try_fwprop_subst): Likewise.
	* ifcvt.c (noce_try_sign_mask): Likewise.
	* loop-doloop.c (doloop_optimize): Likewise.
	* loop-invariant.c (create_new_invariant): Likewise.
	* lower-subreg.c (shift_cost, compute_costs): Likewise.
	* optabs.c (avoid_expensive_constant, prepare_cmp_insn,
	lshift_cheap_p): Likewise.
	* postreload.c (reload_cse_simplify_set, reload_cse_simplify_operands,
	try_replace_in_use, reload_cse_move2add): Likewise.
	* reload1.c (calculate_elim_costs_all_insns, note_reg_elim_costly):
	Likewise.
	* simplify-rtx.c (simplify_binary_operation_1): Likewise.
	* tree-ssa-loop-ivopts.c (computation_cost): Likewise.
	* tree-ssa-reassoc.c (optimize_range_tests_to_bit_test): Likewise.
	* tree-switch-conversion.c (emit_case_bit_tests): Likewise.
	* config/aarch64/aarch64.c (aarch64_rtx_costs): Delete "code" param,
	add "mode" param.  Use "mode: in place of GET_MODE (x).  Pass mode
	to rtx_cost calls.
	* config/alpha/alpha.c (alpha_rtx_costs): Likewise.
	* config/arc/arc.c (arc_rtx_costs): Likewise.
	* config/arm/arm.c (arm_rtx_costs): Likewise.
	* config/avr/avr.c (avr_rtx_costs, avr_rtx_costs_1): Likewise.
	* config/bfin/bfin.c (bfin_rtx_costs): Likewise.
	* config/c6x/c6x.c (c6x_rtx_costs): Likewise.
	* config/cris/cris.c (cris_rtx_costs): Likewise.
	* config/epiphany/epiphany.c (epiphany_rtx_costs): Likewise.
	* config/frv/frv.c (frv_rtx_costs): Likewise.
	* config/h8300/h8300.c (h8300_rtx_costs): Likewise.
	* config/i386/i386.c (ix86_rtx_costs): Likewise.
	* config/ia64/ia64.c (ia64_rtx_costs): Likewise.
	* config/iq2000/iq2000.c (iq2000_rtx_costs): Likewise.
	* config/lm32/lm32.c (lm32_rtx_costs): Likewise.
	* config/m32c/m32c.c (m32c_rtx_costs): Likewise.
	* config/m32r/m32r.c (m32r_rtx_costs): Likewise.
	* config/m68k/m68k.c (m68k_rtx_costs): Likewise.
	* config/mcore/mcore.c (mcore_rtx_costs): Likewise.
	* config/mep/mep.c (mep_rtx_cost): Likewise.
	* config/microblaze/microblaze.c (microblaze_rtx_costs): Likewise.
	* config/mips/mips.c (mips_rtx_costs): Likewise.
	* config/mmix/mmix.c (mmix_rtx_costs): Likewise.
	* config/mn10300/mn10300.c (mn10300_rtx_costs): Likewise.
	* config/msp430/msp430.c (msp430_rtx_costs): Likewise.
	* config/nds32/nds32-cost.c (nds32_rtx_costs_impl): Likewise.
	* config/nds32/nds32-protos.h (nds32_rtx_costs_impl): Likewise.
	* config/nds32/nds32.c (nds32_rtx_costs): Likewise.
	* config/nios2/nios2.c (nios2_rtx_costs): Likewise.
	* config/pa/pa.c (hppa_rtx_costs): Likewise.
	* config/pdp11/pdp11.c (pdp11_rtx_costs): Likewise.
	* config/rl78/rl78.c (rl78_rtx_costs): Likewise.
	* config/rs6000/rs6000.c (rs6000_rtx_costs): Likewise.
	* config/s390/s390.c (s390_rtx_costs): Likewise.
	* config/sh/sh.c (sh_rtx_costs): Likewise.
	* config/sparc/sparc.c (sparc_rtx_costs): Likewise.
	* config/spu/spu.c (spu_rtx_costs): Likewise.
	* config/stormy16/stormy16.c (xstormy16_rtx_costs): Likewise.
	* config/tilegx/tilegx.c (tilegx_rtx_costs): Likewise.
	* config/tilepro/tilepro.c (tilepro_rtx_costs): Likewise.
	* config/v850/v850.c (v850_rtx_costs): Likewise.
	* config/vax/vax.c (vax_rtx_costs): Likewise.
	* config/visium/visium.c (visium_rtx_costs): Likewise.
	* config/xtensa/xtensa.c (xtensa_rtx_costs): Likewise.
	* config/aarch64/aarch64.c (aarch64_rtx_mult_cost): Change type of
	"code" param, and pass as outer_code to first rtx_cost call.  Pass
	mode to rtx_cost calls.
	(aarch64_address_cost, aarch64_if_then_else_costs): Update rtx_cost
	calls.
	(aarch64_rtx_costs_wrapper): Update.
	* config/arm/arm.c (arm_rtx_costs_1, arm_size_rtx_costs,
	arm_unspec_cost, arm_new_rtx_costs, arm_slowmul_rtx_costs): Update
	rtx_cost calls.
	* config/avr/avr.c (avr_final_prescan_insn): Update set_src_cost
	and rtx_cost calls.
	(avr_operand_rtx_cost): Similarly.
	(avr_rtx_costs_1): Correct mode passed to avr_operand_rtx_cost
	for subexpressions of ZERO_EXTEND, SIGN_EXTEND and COMPARE.
	* config/mips/mips.c (mips_stack_address_p): Comment typo.
	(mips_binary_cost): Update rtx_cost and set_src_cost calls.
	(mips_rtx_costs): Use GET_MODE (x) to detect const_int.
	* config/mn10300/mn10300.c (mn10300_address_cost): Pass Pmode to
	rtx_cost.
	(mn10300_rtx_costs): Correct mode passed to mn10300_address_cost.
	* config/rs6000/rs6000.c (rs6000_debug_rtx_costs): Update.
	* config/sh/sh.c (and_xor_ior_costs): Update rtx_cost call.
	* doc/tm.texi: Regenerate.

From-SVN: r225532
2015-07-08 12:32:27 +09:30
Ramana Radhakrishnan e93ca5cade Remove TARGET_RELAXED_ORDERING and optimize for weak memory models.
This patch removes the special casing for targets with relaxed
memory ordering and handles guard accesses with equivalent
atomic load acquire operations. In this process we change the
algorithm to load the guard variable with an atomic load that
has ACQUIRE semantics.

This then means that on targets which have weak memory models, the
fast path is inlined and can directly use a load-acquire instruction
where available (and yay! one more hook gone).

2015-06-04  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

	PR c++/66192
	PR target/66200
	* doc/tm.texi: Regenerate.
	* doc/tm.texi.in (TARGET_RELAXED_ORDERING): Delete.
	* target.def (TARGET_RELAXED_ORDERING): Likewise.
	* config/alpha/alpha.c (TARGET_RELAXED_ORDERING): Likewise.
	* config/ia64/ia64.c (TARGET_RELAXED_ORDERING): Likewise.
	* config/rs6000/rs6000.c (TARGET_RELAXED_ORDERING): Likewise.
	* config/sparc/linux.h (SPARC_RELAXED_ORDERING): Likewise.
	* config/sparc/linux64.h (SPARC_RELAXED_ORDERING): Likewise.
	* config/sparc/sparc.c (TARGET_RELAXED_ORDERING): Likewise.
	* config/sparc/sparc.h (SPARC_RELAXED_ORDERING): Likewise.
	* system.h (TARGET_RELAXED_ORDERING): Poison.

2015-06-04  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

	PR c++/66192
	PR target/66200
	* cp-tree.h (get_guard_cond): Adjust declaration
	* decl.c (expand_static_init): Use atomic load acquire
	and adjust call to get_guard_cond.
	* decl2.c (build_atomic_load_byte): New function.
	(get_guard_cond): Handle thread_safety.
	(one_static_initialization_or_destruction): Adjust call to
	get_guard_cond.

From-SVN: r224118
2015-06-04 09:19:51 +00:00
Trevor Saunders 62f9f30bfb always define STACK_GROWS_DOWNWARD
gcc/c-family/ChangeLog:

2015-05-20  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* c-cppbuiltin.c (c_cpp_builtins): Check the value of
	STACK_GROWS_DOWNWARD rather than if it is defined.

gcc/ChangeLog:

2015-05-20  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* *.c: Check the value of STACK_GROWS_DOWNWARD rather than if it
	is defined.
	* config/**/*.h: Define STACK_GROWS_DOWNWARD to an integer.
	* defaults.h: Provide default for STACK_GROWS_DOWNWARD.
	* doc/tm.texi.in: Update references to STACK_GROWS_DOWNWARD.
	* doc/tm.texi: Regenerate.

From-SVN: r223513
2015-05-22 01:03:11 +00:00
Vladimir Makarov 5074a1f86a re PR rtl-optimization/65862 ([MIPS] IRA/LRA issue: integers spilled to floating-point registers)
2015-05-14  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/65862
	* target.def (ira_change_pseudo_allocno_class): New hook.
	* targhooks.c (default_ira_change_pseudo_allocno_class): Default
	value of the hook.
	* targhooks.h (default_ira_change_pseudo_allocno_class): New
	extern
	* doc/tm.texi.in (TARGET_IRA_CHANGE_PSEUDO_ALLOCNO_CLASS): Add the
	hook.
	* ira-costs.c (find_costs_and_classes): Call the hook and change
	classes when it is necessary.
	* doc/tm.texi: Update.

From-SVN: r223202
2015-05-14 20:40:44 +00:00
Richard Henderson 7ca35180e9 Convert to md_asm_adjust
Using proper vectors instead of lists of trees.

From-SVN: r223025
2015-05-11 16:33:23 -07:00
Kyrylo Tkachov 15ab4e1e79 [doc] Update definition location of attribute_spec in documentation
* target.def (attribute_table): Mention that struct attribute_spec
	is defined in tree-core.h rather than tree.h
	* doc/tm.texi: Regenerate.

From-SVN: r222688
2015-05-01 15:35:15 +00:00
Caroline Tice 81ccb75226 tm.texi: Regenerate.
* doc/tm.texi: Regenerate.

From-SVN: r222655
2015-04-30 21:35:34 +02:00
Trevor Saunders 1e8552c2ee add default for NO_FUNCTION_CSE
gcc/ChangeLog:

2015-04-27  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* calls.c (prepare_call_address): Remove ifdef NO_FUNCTION_CSE.
	* cse.c (fold_rtx): Likewise.
	* config/alpha/alpha.h (NO_FUNCTION_CSE): Define to 1.
	* config/arc/arc.h (NO_FUNCTION_CSE): Likewise.
	* config/avr/avr.h (NO_FUNCTION_CSE): Likewise.
	* config/cr16/cr16.h (NO_FUNCTION_CSE): Likewise.
	* config/epiphany/epiphany.h (NO_FUNCTION_CSE): Likewise.
	* config/frv/frv.h (NO_FUNCTION_CSE): Likewise.
	* config/h8300/h8300.h (NO_FUNCTION_CSE): Likewise.
	* config/i386/i386.h (NO_FUNCTION_CSE): Likewise.
	* config/ia64/ia64.h (NO_FUNCTION_CSE): Likewise.
	* config/lm32/lm32.h (enum reg_class) (NO_FUNCTION_CSE):
	* Likewise.
	* config/m32r/m32r.h (NO_FUNCTION_CSE): Likewise.
	* config/mep/mep.h (NO_FUNCTION_CSE): Likewise.
	* config/mn10300/mn10300.h (NO_FUNCTION_CSE): Likewise.
	* config/nds32/nds32.h (NO_FUNCTION_CSE): Likewise.
	* config/nios2/nios2.h (NO_FUNCTION_CSE): Likewise.
	* config/pa/pa.h (NO_FUNCTION_CSE): Likewise.
	* config/rs6000/rs6000.h (NO_FUNCTION_CSE): Likewise.
	* config/s390/s390.h (NO_FUNCTION_CSE): Likewise.
	* config/sparc/sparc.h (NO_FUNCTION_CSE): Likewise.
	* config/spu/spu.h (NO_FUNCTION_CSE): Likewise.
	* config/stormy16/stormy16.h (NO_FUNCTION_CSE): Likewise.
	* config/v850/v850.h (NO_FUNCTION_CSE): Likewise.
	* defaults.h (NO_FUNCTION_CSE): Provide default definition to 0.
	* doc/tm.texi: Regenerate.
	* doc/tm.texi.in: Document NO_FUNCTION_CSE is always defined to
	either true or false.

From-SVN: r222501
2015-04-28 04:40:00 +00:00
H.J. Lu a55bbe1365 Regenerate doc/tm.texi
* doc/tm.texi: Regenerated.

From-SVN: r221151
2015-03-03 07:52:07 -08:00
Jakub Jelinek 599131236d re PR lto/64374 (LTO ICE in extract_insn, at recog.c:2327)
PR lto/64374
	* target.def (target_option_stream_in): New target hook.
	* tree-streamer-in.c (streamer_read_tree_bitfields): Invoke
	targetm.target_option.post_stream_in if non-NULL.
	* doc/tm.texi.in: Add @hook TARGET_OPTION_POST_STREAM_IN.
	* doc/tm.texi: Updated.
	* config/i386/i386.c (ix86_function_specific_post_stream_in): New
	function.
	(TARGET_OPTION_POST_STREAM_IN): Redefine.

From-SVN: r220958
2015-02-25 07:46:22 +01:00
Bernd Schmidt 6d2b71997e tree-streamer-in.c (unpack_ts_decl_common_value_fields, [...]): If ACCEL_COMPILER, restrict alignments to absolute_biggest_alignment.
* tree-streamer-in.c (unpack_ts_decl_common_value_fields,
	unpack_ts_type_common_value_fields): If ACCEL_COMPILER,
	restrict alignments to absolute_biggest_alignment.
	* config/i386/i386.c (TARGET_ABSOLUTE_BIGGEST_ALIGNMENT):
	Define.
	* doc/tm.texi.in (TARGET_ABSOLUTE_BIGGEST_ALIGNMENT): Add.
	* doc/tm.texi: Regenerate.
	* target.def (absolute_biggest_alignment): New DEFHOOKPOD.

From-SVN: r220882
2015-02-21 00:06:53 +00:00
Joern Rennecke cf6186e9f2 re PR target/64761 (-freorder-blocks-and-partition causes some failures on SH)
PR target/64761
Replace MD_REDIRECT_BRANCH with TARGET_CAN_FOLLOW_JUMP.


Co-Authored-By: Kaz Kojima <kkojima@gcc.gnu.org>

From-SVN: r220552
2015-02-09 23:47:11 +00:00
Zhenqiang Chen 5f3bc02606 [AArch64] Enable CCMP support for AArch64, PR64015 resolved
gcc/
2015-01-16  Zhenqiang Chen  <zhenqiang.chen@arm.com>

	PR target/64015
	* ccmp.c (expand_ccmp_next): New function.
	(expand_ccmp_expr_1, expand_ccmp_expr): Handle operand insn sequence
	and compare insn sequence.
	* config/aarch64/aarch64.c (aarch64_code_to_ccmode,
	aarch64_gen_ccmp_first, aarch64_gen_ccmp_next): New functions.
	(TARGET_GEN_CCMP_FIRST, TARGET_GEN_CCMP_NEXT): New MICRO.
	* config/aarch64/aarch64.md (*ccmp_and): Changed to ccmp_and<mode>.
	(*ccmp_ior): Changed to ccmp_ior<mode>.
	(cmp<mode>): New pattern.
	* doc/tm.texi (TARGET_GEN_CCMP_FIRST, TARGET_GEN_CCMP_NEXT): Update
	parameters.
	* target.def (gen_ccmp_first, gen_ccmp_next): Update parameters.

gcc/testsuite/
2015-01-16  Zhenqiang Chen <zhenqiang.chen@arm.com>

	* gcc.dg/pr64015.c: New test.

From-SVN: r219723
2015-01-16 11:48:00 +00:00
Jakub Jelinek 5624e564d2 Update copyright years.
From-SVN: r219188
2015-01-05 13:33:28 +01:00
Kaz Kojima 14133a4d8a * Add TARGET_LEGITIMIZE_ADDRESS_DISPLACEMENT target macro.
From-SVN: r218887
2014-12-19 04:43:11 +00:00
Kaz Kojima d6220b11a7 * Add TARGET_CANNOT_SUBSTITUTE_MEM_EQUIV target macro.
From-SVN: r218886
2014-12-19 04:40:11 +00:00
Tom de Vries 1e2881031c Rename fuse-caller-save
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
2014-12-03 10:28:25 +00:00
Bin Cheng 51be497740 target.def (fusion_priority): Wrap code with @smallexample.
* target.def (fusion_priority): Wrap code with @smallexample.
	* doc/tm.texi: Regenerated.

From-SVN: r218301
2014-12-03 05:25:40 +00:00
Kyrylo Tkachov 892d9879a8 [sched-deps] Remove needless check for modified_in_p when trying to fuse two 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
2014-11-24 11:09:59 +00:00
Richard Henderson c21df29bcf Make TARGET_STATIC_CHAIN allow a function type
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
2014-11-19 05:30:34 -08:00
James Greenhalgh 445d78261c [Patch] PR target/63937 TARGET_USE_BY_PIECES_INFRASTRUCTURE_P should take an 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-18 22:45:21 +00:00
Zhenqiang Chen 2e0f134153 target.def (gen_ccmp_first, [...]): Add two new hooks.
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
2014-11-17 05:38:41 +00:00
Eric Botcazou 8f048116bf tm.texi.in (TARGET_FLAGS_REGNUM): Move around.
* doc/tm.texi.in (TARGET_FLAGS_REGNUM): Move around.
	* doc/tm.texi: Regenerate.

From-SVN: r217628
2014-11-16 15:49:37 +00:00
Bin Cheng b16abbcb85 timevar.def (TV_SCHED_FUSION): New time var.
* 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
2014-11-14 02:32:38 +00:00
Bernd Schmidt c713ddc031 [PATCH 6/7] OpenMP 4.0 offloading infrastructure: option handling.
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
2014-11-13 13:54:07 +00:00
Ilya Verbin ec6fe917cd [PATCH 3/7] OpenMP 4.0 offloading infrastructure: Offload tables.
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
2014-11-13 13:44:04 +00:00
Eric Botcazou 95cc11e163 tm.texi.in (SELECT_CC_MODE): Update example.
* 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
2014-11-13 11:44:26 +00:00
Bernd Schmidt 0d4b5b86f2 Add a target hook for assembling undeclared decls.
* 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
2014-11-10 16:12:21 +00:00
Bernd Schmidt 2f21e1ba46 Add a hook to inform a port about call arguments.
* 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
2014-11-06 17:20:13 +00:00
Bernd Schmidt dc2af904c9 Add a new asm hook to print the end of a variable definition.
* 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
2014-11-06 17:19:48 +00:00
Ilya Enkovich d5e254e19c ipa-chkp.c: New.
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
2014-11-05 12:42:03 +00:00
Bernd Schmidt e0d14c396a Allow a target to skip an unnecssary register return value for a struct return.
* 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
2014-11-05 12:14:36 +00:00
Bernd Schmidt a50fa76a9d Add a no_register_allocation target hook.
* 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
2014-11-05 12:14:27 +00:00
James Greenhalgh a5474c4cb0 [Patch 7/7] Remove *_BY_PIECES_P
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
2014-11-01 10:38:42 +00:00
James Greenhalgh 7cbed00872 [Patch 1/7] Hookize *_BY_PIECES_P
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
2014-11-01 08:13:09 +00:00
Richard Sandiford ef4bddc299 decl.c, [...]: Remove redundant enum from machine_mode.
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
2014-10-29 12:02:45 +00:00
Kirill Yukhin bcb21886b9 re PR target/8340 (ICE on x86 inline asm w/ -fPIC)
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
2014-10-13 17:26:49 +00:00
Joseph Myers 9a79452d4c Remove LIBGCC2_LONG_DOUBLE_TYPE_SIZE target macro.
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
2014-09-23 01:48:46 +01:00
David Malcolm 9158a0d8c7 The various TARGET_ASM_..._MAX_SKIP hooks take an insn
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
2014-09-15 15:57:31 +00:00
David Malcolm c1ce59ab7f The TARGET_CAN_FOLLOW_JUMP hook takes insns
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
2014-09-15 15:49:09 +00:00
Joseph Myers 8cc4b7a26d Remove LIBGCC2_HAS_?F_MODE target macros.
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
2014-09-12 13:05:18 +01:00
Joseph Myers 66bb34c090 Remove SF_SIZE etc. target macros.
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
2014-09-08 13:25:35 +01:00
Joseph Myers 9686a2e668 Remove no-longer-needed fp-bit target macros.
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
2014-09-08 13:22:56 +01:00
Matthew Fortune ff050c66b1 Add target hook to override DWARF2 frame register size
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
2014-09-04 08:32:05 +00:00
David Malcolm ac44248e6a Use rtx_insn for various target.def hooks
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
2014-08-27 19:34:13 +00:00
David Malcolm ce1ce33a03 Strengthen haifa_sched_info callbacks and 3 scheduler hooks
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
2014-08-25 21:19:23 +00:00
Kito Cheng ef24330ddf Remove CALLER_SAVE_PROFITABLE since it is not used at present.
* 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
2014-08-24 02:52:46 +00:00