134950 Commits

Author SHA1 Message Date
Alan Lawrence
a844a69583 [AArch64] Remove/merge redundant iterators
* config/aarch64/aarch64-simd.md (aarch64_simd_dup<mode>, orn<mode>3,
	bic<mode>3, add<mode>3, sub<mode>3, neg<mode>2, abs<mode>2, and<mode>3,
	ior<mode>3, xor<mode>3, one_cmpl<mode>2,
	aarch64_simd_lshr<mode> ,arch64_simd_ashr<mode>,
	aarch64_simd_imm_shl<mode>, aarch64_simd_reg_sshl<mode>,
	aarch64_simd_reg_shl<mode>_unsigned, aarch64_simd_reg_shr<mode>_signed,
	ashl<mode>3, lshr<mode>3, ashr<mode>3, vashl<mode>3,
	reduc_plus_scal_<mode>, aarch64_vcond_internal<mode><mode>,
	vcondu<mode><mode>, aarch64_cm<optab><mode>, aarch64_cmtst<mode>):
	Change VDQ to VDQ_I.

	(mul<mode>3): Change VDQM to VDQ_BHSI.
	(aarch64_simd_vec_set<mode>,vashr<mode>3, vlshr<mode>3, vec_set<mode>,
	aarch64_mla<mode>, aarch64_mls<mode>, <su><maxmin><mode>3,
	aarch64_<sur>h<addsub><mode>): Change VQ_S to VDQ_BHSI.
	
	(*aarch64_<su>mlal<mode>, *aarch64_<su>mlsl<mode>,
	aarch64_<ANY_EXTEND:su><ADDSUB:optab>l<mode>,
	aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>, aarch64_<sur>shll_n<mode>):
	Change VDW to VD_BHSI.
	(*aarch64_combinez<mode>, *aarch64_combinez_be<mode>):
	Change VDIC to VD_BHSI.

	* config/aarch64/aarch64-simd-builtins.def (saddl, uaddl, ssubl, usubl,
	saddw, uaddw, ssubw, usubw, shadd, uhadd, srhadd, urhadd, sshll_n,
	ushll_n): Change BUILTIN_VDW to BUILTIN_VD_BHSI.

	* config/aarch64/iterators.md (SDQ_I, VDQ, VQ_S, VSDQ_I_BHSI, VDQM, VDW,
	VDIC, VDQQHS): Remove.
	(Vwtype): Update comment (changing VDW to VD_BHSI).

From-SVN: r218310
2014-12-03 12:12:07 +00:00
Jonathan Wakely
db97b3b018 hashtable.h: Fix whitespace and simplify function definitions with trailing return types.
* include/bits/hashtable.h: Fix whitespace and simplify function
	definitions with trailing return types.

From-SVN: r218309
2014-12-03 12:00:02 +00:00
Richard Biener
e18c1d66ef re PR tree-optimization/14541 ([tree-ssa] built-in math functions are not fully optimized at tree level)
2014-12-03  Richard Biener  <rguenther@suse.de>

	PR middle-end/14541
	* builtins.c (fold_builtin_logarithm): Implement simplifications ...
	* match.pd: ... here as patterns.

From-SVN: r218308
2014-12-03 11:55:14 +00:00
Prachi Godbole
e43187ab49 p5600.md (define_automaton, [...]): Replace p5600_agen_pipe and p5600_alu_pipe with p5600_agen_alq_pipe.
2014-12-03  Prachi Godbole  <prachi.godbole@imgtec.com>

	* config/mips/p5600.md (define_automaton, define_cpu_unit): Replace
	p5600_agen_pipe and p5600_alu_pipe with p5600_agen_alq_pipe.
	(p5600_int_arith_1, p5600_int_arith_2, p5600_int_arith_4): Change
	reservation order.

From-SVN: r218307
2014-12-03 11:16:00 +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
Yury Gribov
e28f2090db Improve optimization of ASan checks.
2014-12-03  Yury Gribov  <y.gribov@samsung.com>

gcc/
	* sanopt.c (maybe_get_single_definition): New function.
	(maybe_get_dominating_check): Ditto.
	(can_remove_asan_check): Ditto.
	(struct tree_map_traits): New struct.
	(struct sanopt_ctx): Use custom traits for asan_check_map.
	(maybe_optimize_ubsan_null_ifn): Move code to
	maybe_get_dominating_check.
	(maybe_optimize_asan_check_ifn): Move code and take non-SSA expressions
	into account when optimizing.
	(sanopt_optimize_walker): Optimize ASan checks even when
	recovering.

From-SVN: r218304
2014-12-03 09:23:28 +00:00
Ilya Enkovich
45392c7650 constraints.md (Yr): New.
gcc/

	* config/i386/constraints.md (Yr): New.
	* config/i386/i386.h (reg_class): Add NO_REX_SSE_REGS.
	(REG_CLASS_NAMES): Likewise.
	(REG_CLASS_CONTENTS): Likewise.
	* config/i386/sse.md (*vec_concatv2sf_sse4_1): Add alternatives
	which use only NO_REX_SSE_REGS.
	(vec_set<mode>_0): Likewise.
	(*vec_setv4sf_sse4_1): Likewise.
	(sse4_1_insertps): Likewise.
	(*sse4_1_extractps): Likewise.
	(*sse4_1_mulv2siv2di3<mask_name>): Likewise.
	(*<sse4_1_avx2>_mul<mode>3<mask_name>): Likewise.
	(*sse4_1_<code><mode>3<mask_name>): Likewise.
	(*sse4_1_<code><mode>3): Likewise.
	(*sse4_1_eqv2di3): Likewise.
	(sse4_2_gtv2di3): Likewise.
	(*vec_extractv4si): Likewise.
	(*vec_concatv2si_sse4_1): Likewise.
	(vec_concatv2di): Likewise.
	(<sse4_1>_blend<ssemodesuffix><avxsizesuffix>): Likewise.
	(<sse4_1>_blendv<ssemodesuffix><avxsizesuffix>): Likewise.
	(<sse4_1>_dp<ssemodesuffix><avxsizesuffix>): Likewise.
	(<vi8_sse4_1_avx2_avx512>_movntdqa): Likewise.
	(<sse4_1_avx2>_mpsadbw): Likewise.
	(<sse4_1_avx2>packusdw<mask_name>): Likewise.
	(<sse4_1_avx2>_pblendvb): Likewise.
	(sse4_1_pblendw): Likewise.
	(sse4_1_phminposuw): Likewise.
	(sse4_1_<code>v8qiv8hi2<mask_name>): Likewise.
	(sse4_1_<code>v4qiv4si2<mask_name>): Likewise.
	(sse4_1_<code>v4hiv4si2<mask_name>): Likewise.
	(sse4_1_<code>v2qiv2di2<mask_name>): Likewise.
	(sse4_1_<code>v2hiv2di2<mask_name>): Likewise.
	(sse4_1_<code>v2siv2di2<mask_name>): Likewise.
	(sse4_1_ptest): Likewise.
	(<sse4_1>_round<ssemodesuffix><avxsizesuffix>): Likewise.
	(sse4_1_round<ssescalarmodesuffix>): Likewise.
	* config/i386/subst.md (mask_prefix4): New.
	* config/i386/x86-tune.def (X86_TUNE_AVOID_4BYTE_PREFIXES): New.

gcc/testsuites/

	* gcc.target/i386/sse2-init-v2di-2.c: Adjust to changed
	vec_concatv2di template.

From-SVN: r218303
2014-12-03 08:45:45 +00:00
Segher Boessenkool
17adbcebf0 re PR rtl-optimization/52714 (ICE in fixup_reorder_chain, at cfglayout.c:880)
PR rtl-optimization/52714
	* combine.c (try_combine): Allow combining two insns into two
	new insns if at least one of those is a noop.

gcc/testsuite/
	* gcc.target/m68k/pr52714.c: New testcase.

From-SVN: r218302
2014-12-03 07:00:54 +01: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
Jonathan Wakely
28fe2ab37c re PR libstdc++/64161 (bootstrap error: condition_variable.cc:134:7: error: 'atexit' is not a member of 'std')
PR libstdc++/64161
	* src/c++11/condition_variable.cc: Include <cstdlib>.

From-SVN: r218300
2014-12-03 01:34:03 +00:00
GCC Administrator
4d8820d6d9 Daily bump.
From-SVN: r218299
2014-12-03 00:16:28 +00:00
Tobias Burnus
f40315996b error.c (warnings_not_errors): Use bool.
2014-12-02  Tobias Burnus  <burnus@net-b.de>
            Manuel López-Ibáñez  <manu@gcc.gnu.org>

        * error.c (warnings_not_errors): Use bool.
        (gfc_clear_error): Update.
        (gfc_get_errors): Ditto. Use bool argument.
        * gfortran.h (gfc_get_errors): Update prototype.
        * resolve.c (resolve_global_procedure): Update call.


Co-Authored-By: Manuel López-Ibáñez <manu@gcc.gnu.org>

From-SVN: r218296
2014-12-03 00:39:49 +01:00
Manuel López-Ibáñez
7f9283bf66 libcpp uses diagnostic->override_column to give a custom column number to diagnostics.
libcpp uses diagnostic->override_column to give a custom column number to
diagnostics. This is taken into account when building the prefix, but it was
missing when placing the caret.

2014-12-03  Manuel López-Ibáñez  <manu@gcc.gnu.org>

	* diagnostic.c (diagnostic_show_locus): Honor override_column when
	placing the caret.

From-SVN: r218295
2014-12-02 23:16:21 +00:00
Tobias Burnus
f5d5b88fe5 download_prerequisites: Download ISL 0.14 instead of 0.12.2.
2014-12-02  Tobias Burnus  <burnus@net-b.de>

        * download_prerequisites: Download ISL 0.14 instead of 0.12.2.

From-SVN: r218294
2014-12-02 23:41:01 +01:00
Dmitry Vyukov
f1d15bb914 asan: support for globals in kernel
2014-12-02  Dmitry Vyukov  <dvyukov@google.com>
* asan.c: (asan_finish_file): Use default priority for constructors
in kernel mode.

From-SVN: r218281
2014-12-02 10:58:59 -08:00
Uros Bizjak
d455c0b530 avx512ifma-vpmaddhuq-2.c: Define AVX512IFMA.
* gcc.target/i386/avx512ifma-vpmaddhuq-2.c: Define AVX512IFMA.
	* gcc.target/i386/avx512ifma-vpmaddluq-2.c: Ditto.
	* gcc.target/i386/avx512vbmi-vpermb-2.c: Define AVX512VBMI.
	* gcc.target/i386/avx512vbmi-vpermi2b-2.c: Ditto.
	* gcc.target/i386/avx512vbmi-vpermt2b-2.c: Ditto.
	* gcc.target/i386/avx512vbmi-vpmultishiftqb-2.c: Ditto.

From-SVN: r218280
2014-12-02 18:32:27 +01:00
Marek Polacek
253a921b41 constexpr.c (cxx_eval_check_shift_p): New function.
* constexpr.c (cxx_eval_check_shift_p): New function.
	(cxx_eval_binary_expression): Call it.  Set NON_CONSTANT_P if it
	returns true.

	* g++.dg/cpp0x/constexpr-shift1.C: New test.
	* g++.dg/cpp1y/constexpr-shift1.C: New test.
	* g++.dg/ubsan/pr63956.C: Add dg-errors.

From-SVN: r218279
2014-12-02 17:23:34 +00:00
Manuel López-Ibáñez
73bd83290a line-map.h (linemap_assert_fails): Declare.
libcpp/ChangeLog:

2014-12-02  Manuel López-Ibáñez  <manu@gcc.gnu.org>

	* include/line-map.h (linemap_assert_fails): Declare.
	* line-map.c (linemap_position_for_loc_and_offset): Use it.

From-SVN: r218277
2014-12-02 16:03:31 +00:00
Manuel López-Ibáñez
9c320ab1f1 line-map.c (linemap_add): Fix typo.
2014-12-02  Manuel López-Ibáñez  <manu@gcc.gnu.org>

        * line-map.c (linemap_add): Fix typo.
        (linemap_line_start): Fix whitespace.

From-SVN: r218276
2014-12-02 16:00:33 +00:00
Ulrich Weigand
3c610413ca re PR target/64115 (ICE: : in rs6000_delegitimize_address, at config/rs6000/rs6000.c:7051)
PR target/64115
	* config/rs6000/rs6000.c (rs6000_delegitimize_address): Remove
	invalid UNSPEC_TOCREL sanity check under ENABLE_CHECKING.

From-SVN: r218273
2014-12-02 14:27:46 +00:00
H.J. Lu
0f884e6709 Stop only if there aren't any usable algorithms
When searching for an usable algorithm with -minline-all-stringops,
decide_alg stops when it sees libcall even if there is a usable
algorithm.  It goes into an infinite loop.  This patch changes
decide_alg to stop searching only if there aren't any usable algorithms.
Testd on Linux/x86-64.


gcc/

	PR target/64108
	* config/i386/i386.c (decide_alg): Stop only if there aren't
	any usable algorithms.

gcc/testsuite/

	PR target/64108
	* gcc.target/i386/memset-strategy-2.c: New test.

From-SVN: r218272
2014-12-02 06:10:23 -08:00
Tom de Vries
fb98f8869b re PR rtl-optimization/63718 (ARM Thumb1 bootstrap fail after fuse-caller-save info in cprop-hardreg)
2014-12-02  Tom de Vries  <tom@codesourcery.com>

	PR rtl-optimization/63718
	* config/arm/arm.c (arm_option_override): Disable fuse-caller-save for
	Thumb1.

From-SVN: r218271
2014-12-02 13:35:10 +00:00
Jonathan Wakely
e3376050fc status_cxx2011.xml: Update.
* doc/xml/manual/status_cxx2011.xml: Update.
	* doc/xml/manual/status_cxx2014.xml: Update.
	* doc/html/manual/status.html: Regenerate.

From-SVN: r218270
2014-12-02 13:26:18 +00:00
Richard Biener
ac19a30334 match.pd: When combining divisions exclude the degenerate case involving INT_MIN from...
2014-12-02  Richard Biener  <rguenther@suse.de>

	* match.pd: When combining divisions exclude the degenerate
	case involving INT_MIN from overflow handling.

	* gcc.dg/torture/20141202-1.c: New testcase.

From-SVN: r218269
2014-12-02 13:09:13 +00:00
H.J. Lu
88936a2bfd Add a test for PR ipa/63814
PR ipa/63814
	* g++.dg/ipa/pr63814.C: New test.

From-SVN: r218268
2014-12-02 04:47:29 -08:00
Jiong Wang
ffc510234e [AArch64/testsuite] Add missing testcase
Add the missing testcase.
  (forget svn add in previous commit ...)

From-SVN: r218267
2014-12-02 11:57:08 +00:00
Wilco Dijkstra
048f927a75 [PATCH] Improve spillcost of literal pool loads
2014-12-02  Wilco Dijkstra  <wdijkstr@arm.com>

  gcc/
    ira-costs.c (scan_one_insn): Improve spill cost adjustment.

  gcc/testsuite
    gcc.target/aarch64/remat1.c: New testcase.

From-SVN: r218266
2014-12-02 11:55:08 +00:00
Martin Jambor
47f4756ed1 re PR ipa/63814 (g++.dg/ipa/pr61160-1.C fails with -m32 -fPIC)
2014-12-02  Martin Jambor  <mjambor@suse.cz>

	PR ipa/63814
	* ipa-cp.c (same_node_or_its_all_contexts_clone_p): New function.
	(cgraph_edge_brings_value_p): New parameter dest, use
	same_node_or_its_all_contexts_clone_p and check availability.
	(cgraph_edge_brings_value_p): Likewise.
	(get_info_about_necessary_edges): New parameter dest, pass it to
	cgraph_edge_brings_value_p.  Update caller.
	(gather_edges_for_value): Likewise.
	(perhaps_add_new_callers): Use cgraph_edge_brings_value_p to check
	both the destination and availability.

From-SVN: r218265
2014-12-02 11:12:27 +01:00
Uros Bizjak
c271ca677e re PR target/64113 (Gcc on Alpha: Error: No lda !gpdisp!282 was found)
PR target/64113
	* config/alpha/alpha.md (call_value_osf_tlsgd): Do not split insn
	using post-reload splitter.  Use peephole2 pass instead.
	(call_value_osf_tlsldm): Ditto.
	(TLS_CALL): New int iterator.
	(tls): New int attribute.
	(call_value_osf_<tls>): Merge insn pattern from call_value_osf_tlsgd
	and call_value_tlsldm using TLS_CALL int iterator.

From-SVN: r218264
2014-12-02 11:04:14 +01:00
Richard Biener
1c9b044857 genmatch.c: Include hash-set.h.
2014-12-02  Richard Biener  <rguenther@suse.de>
	Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>

	* genmatch.c: Include hash-set.h.
	(fatal_at): Add source_location overload.
	(parser::record_operlist): New method.
	(parser::push_simplify): Likewise.
	(parser::oper_lists_set): New member.
	(parser::oper_lists): Likewise.
	(parser::parse_operation): Record seen operator list references.
	(parser::parse_c_expr): Likewise.
	(parser::parse_simplify): Init oper_lists_set and oper_lists
	and use push_simplify.
	(parser::parser): Init oper_lists_set and oper_lists.

Co-Authored-By: Prathamesh Kulkarni <bilbotheelffriend@gmail.com>

From-SVN: r218261
2014-12-02 09:30:15 +00:00
Richard Biener
280931058a match.pd: Restrict division combining to trunc_div and exact_div.
2014-12-02  Richard Biener  <rguenther@suse.de>

	* match.pd: Restrict division combining to trunc_div and
	exact_div.

From-SVN: r218260
2014-12-02 09:03:44 +00:00
Richard Biener
e1b7f42ec6 re PR fortran/64137 (Fortran FE builds invalid GENERIC)
2014-12-02  Richard Biener  <rguenther@suse.de>

	PR fortran/64137
	* trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Check
	proper expressions type, use proper type for computing
	-Huge - 1.

From-SVN: r218259
2014-12-02 08:50:57 +00:00
Jakub Jelinek
9b489f313c sparc.c (sparc_atomic_assign_expand_fenv): Remove NULL last argument from create_tmp_var calls.
* config/sparc/sparc.c (sparc_atomic_assign_expand_fenv):
	Remove NULL last argument from create_tmp_var calls.
	* config/mips/mips.c (mips_atomic_assign_expand_fenv): Likewise.
	* config/arm/arm-builtins.c (arm_atomic_assign_expand_fenv): Likewise.
	* config/i386/i386.c (add_condition_to_bb,
	ix86_atomic_assign_expand_fenv): Likewise.
	* config/mep/mep.c (mep_gimplify_va_arg_expr): Likewise.
	* config/xtensa/xtensa.c (xtensa_gimplify_va_arg_expr): Likewise.
	* config/aarch64/aarch64-builtins.c
	(aarch64_atomic_assign_expand_fenv): Likewise.
	* config/stormy16/stormy16.c (xstormy16_gimplify_va_arg_expr):
	Likewise.
	* config/rs6000/rs6000.c (rs6000_atomic_assign_expand_fenv): Likewise.
	* config/alpha/alpha.c (alpha_atomic_assign_expand_fenv): Likewise.
	* config/sh/sh.c (sh_gimplify_va_arg_expr): Likewise.

From-SVN: r218257
2014-12-02 08:45:36 +01:00
Jakub Jelinek
0d3d81525d alpha.c (alpha_gimple_fold_builtin): Use gimple_build_assign instead of gimple_build_assign_with_ops and swap the...
* config/alpha/alpha.c (alpha_gimple_fold_builtin): Use
	gimple_build_assign instead of gimple_build_assign_with_ops and swap
	the order of first two arguments.
	* config/aarch64/aarch64-builtins.c (aarch64_gimple_fold_builtin):
	Likewise.  Remove last NULL_TREE argument.

From-SVN: r218256
2014-12-02 08:32:54 +01:00
Jonathan Wakely
9db7c9316e Define *_at_thread_exit() functions.
* config/abi/pre/gnu.ver: Add new exports.
	* include/std/condition_variable (notify_all_at_thread_exit): Declare.
	(__at_thread_exit_elt): New base class.
	* include/std/future: Add comments documenting the implementation.
	(__future_base::_State_baseV2::_State_baseV2()): Use brace-or-equal
	initializers and define constructor as defaulted.
	(__future_base::_State_baseV2::_M_ready): Replace member function
	with member variable.
	(__future_base::_State_baseV2::_M_set_result): Set _M_ready.
	(__future_base::_State_baseV2::_M_set_delayed_result): Define.
	(__future_base::_State_baseV2::_M_break_promise): Set _M_ready.
	(__future_base::_State_baseV2::_Make_ready): New helper class.
	(__future_base::_Deferred_state::_M_has_deferred): Remove requirement
	for caller to own mutex.
	(__future_base::_Async_state_impl::~_Async_state_impl): Call join
	directly.
	(__future_base::_Task_state_base::_M_run): Take arguments by
	reference.
	(__future_base::_Task_state_base::_M_run_delayed): Declare new pure
	virtual function.
	(__future_base::_Task_state::_M_run_delayed): Define override.
	(promise::set_value_at_thread_exit): Define.
	(promise::set_exception_at_thread_exit): Define.
	(packaged_task::make_ready_at_thread_exit): Define.
	* src/c++11/condition_variable.cc (notify_all_at_thread_exit): Define.
	* src/c++11/future.cc
	(__future_base::_State_baseV2::_Make_ready::_M_set): Define.
	* testsuite/30_threads/condition_variable/members/3.cc: New.
	* testsuite/30_threads/packaged_task/members/at_thread_exit.cc: New.
	* testsuite/30_threads/promise/members/at_thread_exit.cc: New.

From-SVN: r218255
2014-12-02 01:51:25 +00:00
GCC Administrator
8581fd6499 Daily bump.
From-SVN: r218254
2014-12-02 00:16:25 +00:00
Oleg Endo
70c9ce2d46 re PR rtl-optimization/59278 (combine does not replace matched insn)
testsuite/
	PR rtl-optimization/59278
	* gcc.target/sh/pr59278.c: New.

From-SVN: r218251
2014-12-01 23:53:12 +00:00
Segher Boessenkool
14f2df344a re PR rtl-optimization/59278 (combine does not replace matched insn)
PR rtl-optimization/59278
	combine (reg_dead_at_p): Consider REG_UNUSED notes.

From-SVN: r218250
2014-12-02 00:48:26 +01:00
Segher Boessenkool
dd400a3627 * combine.c (try_combine): Use is_parallel_of_n_reg_sets some more.
From-SVN: r218249
2014-12-01 23:37:34 +01:00
Segher Boessenkool
9d2f8e16f5 combine.c (is_parallel_of_n_reg_sets): New function.
* combine.c (is_parallel_of_n_reg_sets): New function.
	(can_split_parallel_of_n_reg_sets): New function.
	(try_combine): If I2 is a PARALLEL of two SETs, split it into
	two insns if possible.

From-SVN: r218248
2014-12-01 23:36:12 +01:00
Tobias Burnus
797d88589e re PR middle-end/64017 (Support ISL 0.14.0 (to fix ICE with gfortran.dg/graphite/pr42393.f90))
2014-12-01  Tobias Burnus  <burnus@net-b.de>
            Jack Howarth  <howarth@bromo.med.uc.edu>

        PR middle-end/64017
        * configure.ac
        * (ac_has_isl_schedule_constraints_compute_schedule):
        New check.
        * doc/install.texi (ISL): Permit ISL 0.14.
        * graphite-optimize-isl.c (getScheduleForBandList,
        * optimize_isl):
        Conditionally use ISL 0.13+ functions.
        * graphite-interchange.c: Make 'extern "C"' conditional.
        * graphite-isl-ast-to-gimple.c: Ditto.
        * graphite-poly.c: Ditto.
        * graphite-sese-to-poly.c: Ditto.
        * config.in: Regenerate.
        * gcc/configure: Regenerate.


Co-Authored-By: Jack Howarth <howarth@bromo.med.uc.edu>

From-SVN: r218247
2014-12-01 20:07:37 +01:00
David Malcolm
81ba15f105 Improvements to documentation of gcc_jit_context_release
gcc/jit/ChangeLog:
	* docs/examples/tut02-square.c (main): Release the context
	earlier, to show that this is possible.  Update error-handling
	to avoid a double-release of the context, and to avoid
	releasing a NULL result.
	* docs/intro/tutorial02.rst: Discuss gcc_jit_context_release.
	* docs/topics/functions.rst (GCC_JIT_FUNCTION_EXPORTED): Emphasize
	* docs/topics/results.rst (gcc_jit_result): Mention that this
	controls the lifetimes of machine code functions.
	(gcc_jit_result_get_code): Spell out the requirements for this
	to succeed, and the lifetime of the result.
	(gcc_jit_result_release): Mention that this invalidates any code
	that was obtained from the result.
	* docs/_build/texinfo/libgccjit.texi: Regenerate.

From-SVN: r218245
2014-12-01 18:53:44 +00:00
Paolo Carlini
ad1f2178c1 re PR c++/60859 (Value-initialization of scalar in aggregate yields "braces around scalar initializer")
/cp
2014-12-01  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/60859
	* decl.c (reshape_init_r): Do not reject value-initialization of
	scalar array element.

/testsuite
2014-12-01  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/60859
	* g++.dg/cpp0x/initlist88.C: New.

From-SVN: r218244
2014-12-01 18:52:05 +00:00
David Malcolm
e250f0dcfe PR jit/64018: Add description of error-handling to the JIT tutorial
gcc/jit/ChangeLog:
	PR jit/64018
	* docs/intro/tutorial02.rst: Spell out lifetime of generated code.
	Add description of error-handling, taken in part from...
	* docs/topics/contexts.rst (Error-handling): Expand, and move some
	content to tutorial02.rst.
	* docs/_build/texinfo/libgccjit.texi: Regenerate.

From-SVN: r218243
2014-12-01 18:47:31 +00:00
Segher Boessenkool
9838117b0d * combine.c (distribute_links): Handle multiple SETs.
From-SVN: r218242
2014-12-01 19:28:07 +01:00
Segher Boessenkool
66d4b01246 combine.c (struct insn_link): New field `regno'.
* combine.c (struct insn_link): New field `regno'.
	(alloc_insn_link): New parameter `regno'.  Use it.
	(find_single_use): Check the new field.
	(can_combine_def_p, can_combine_use_p): New functions.  Split
	off from ...
	(create_log_links): ... here.  Correct data type of `regno'.
	Adjust call to alloc_insn_link.
	(adjust_for_new_dest): Find regno, use it in call to
	alloc_insn_link.
	(try_combine): Check reg_used_between_p when combining a PARALLEL
	as earlier insn.  Adjust call to alloc_insn_link.
	(distribute_links): Check the new field.

From-SVN: r218241
2014-12-01 19:26:20 +01:00
David Malcolm
eeafb31957 PR jit/64020: Fixes to handling of builtins
PR jit/64020
	* docs/topics/types.rst (Standard types) Add new enum values to
	the table of enum gcc_jit_types: GCC_JIT_TYPE_COMPLEX_FLOAT,
	GCC_JIT_TYPE_COMPLEX_DOUBLE, GCC_JIT_TYPE_COMPLEX_LONG_DOUBLE.
	Widen the left-hand column so that
	GCC_JIT_TYPE_COMPLEX_LONG_DOUBLE will fit.
	* docs/_build/texinfo/libgccjit.texi: Regenerate.

	* jit-builtins.c: Include stringpool.h and jit-playback.h.
	Move everything out of the gcc::jit::recording namespace into
	just gcc::jit.
	(struct builtin_data): Add fields "fnclass", "attr", and
	"implicit_p".
	(DEF_BUILTIN): Update macro so populate the new fields.
	(builtins_manager::builtins_manager): Update for move out of
	recording namespace.  Initialize the m_attributes array.
	(builtins_manager::get_builtin_function): Likewise.
	(builtins_manager::get_builtin_function_by_id): New function.
	(builtins_manager::make_builtin_function): Update for move out of
	recording namespace.  Add fix for PR jit/64020 by detecting
	specific builtin ids and having them ensure that builtins for
	other ids are created as necessary.
	(builtins_manager::get_type): Update for move out of recording
	namespace.
	(builtins_manager::make_type): Likewise.  Add some missing
	#undefs.
	(builtins_manager::make_primitive_type): Update for move out of
	recording namespace.  Implement the three BT_COMPLEX_ cases and
	BT_DOUBLE_PTR.
	(builtins_manager::make_fn_type): Update for move out of recording
	namespace.
	(builtins_manager::make_ptr_type): Likewise.
	(builtins_manager::finish_playback): New function.
	(builtins_manager::get_class): New function.
	(builtins_manager::implicit_p): New function.
	(builtins_manager::get_attrs_tree): Two new functions.
	(builtins_manager::make_attrs_tree): New function.

	* jit-builtins.h: Move everything out of the gcc::jit::recording
	namespace into just gcc::jit.
	(enum built_in_attribute): New.
	(builtins_manager::builtins_manager): Update decl for namespace
	change.
	(builtins_manager::get_builtin_function): Likewise.
	(builtins_manager::get_class): New.
	(builtins_manager::implicit_p): New.
	(builtins_manager::get_attrs_tree): Two new functions.
	(builtins_manager::make_attrs_tree): New function.
	(builtins_manager::finish_playback): New.
	(builtins_manager::get_builtin_function_by_id): New.
	(builtins_manager::make_builtin_function): Update decl for
	namespace change.
	(builtins_manager::get_type): Likewise.
	(builtins_manager::make_type): Likewise.
	(builtins_manager::make_primitive_type): Likewise.
	(builtins_manager::make_fn_type): Likewise.
	(builtins_manager::make_ptr_type): Likewise.
	(builtins_manager): Likewise for fields.  Add new field
	"m_attributes".

	* jit-common.h (NUM_GCC_JIT_TYPES): Update.
	(builtins_manager): Update forward decl to reflect namespace
	change.

	* jit-playback.c: Include attribs.h and jit-builtins.h.
	(gcc::jit::playback::context::get_tree_node_for_type): Add cases
	for the new COMPLEX_ types.
	(gcc::jit::playback::context::new_function): If creating a
	builtin, set the DECL_BUILT_IN_CLASS and attributes on the fndecl,
	and call set_builtin_decl.
	(gcc::jit::playback::context::replay): If we have a
	builtins_manager, call its finish_playback method when we're done.

	* jit-playback.h:
	(gcc::jit::playback::context::get_builtins_manager): New function.

	* jit-recording.c
	(gcc::jit::recording::context::get_builtins_manager): New function.
	(gcc::jit::recording::get_builtin_function): Use
	get_builtins_manager, in case we're a child context.
	(gcc::jit::recording::memento_of_get_type::dereference): Add the
	COMPLEX_ types.
	(gcc::jit::recording::memento_of_get_type::is_int): Likewise.
	(gcc::jit::recording::memento_of_get_type::is_float): Likewise.
	(gcc::jit::recording::memento_of_get_type::is_bool): Likewise.
	(get_type_strings): Likewise.

	* jit-recording.h
	(gcc::jit::recording::context::get_builtins_manager): New.

	* libgccjit.h (enum gcc_jit_types): Add
	GCC_JIT_TYPE_COMPLEX_FLOAT, GCC_JIT_TYPE_COMPLEX_DOUBLE,
	GCC_JIT_TYPE_COMPLEX_LONG_DOUBLE.

From-SVN: r218240
2014-12-01 18:23:37 +00:00
David Malcolm
23844fd730 jit-builtins.c: Fix segfault on unsupported builtins
gcc/jit/ChangeLog:
	* jit-builtins.c
	(gcc::jit::recording::builtins_manager::get_builtin_function):
	Check for NULL return from make_builtin_function.
	(gcc::jit::recording::builtins_manager::make_builtin_function):
	Check for NULL return from get_type.

From-SVN: r218239
2014-12-01 18:16:37 +00:00
David Malcolm
c6760a1317 jit-playback: Move dso-creation into its own function
gcc/jit/ChangeLog:
	* jit-playback.c (gcc::jit::playback::context::compile): Move DSO
	creation code into...
	(gcc::jit::playback::context::convert_to_dso): New function.
	* jit-playback.h (gcc::jit::playback::context::convert_to_dso):
	New function.

From-SVN: r218238
2014-12-01 18:02:45 +00:00
David Malcolm
8f50ee3cbe jit-playback: Move argv-creation to its own function
gcc/jit/ChangeLog:
	* jit-playback.c (gcc::jit::playback::context::compile): Use an
	auto_vec<const char *> rather than a const char *[20] for the
	top-level argv, and move the logic to build it to...
	(gcc::jit::playback::context::make_fake_args): New function.
	* jit-playback.h (gcc::jit::playback::context::make_fake_args):
	New function.

From-SVN: r218237
2014-12-01 17:56:34 +00:00