Commit Graph

140939 Commits

Author SHA1 Message Date
Jeff Law 2a43063e82 [PATCH] Fix building microblaze targets with trunk
[PATCH] Fix building microblaze targets with trunk
	* config/microblaze/microblaze.c (microblaze_version_to_int): Remove
	computation of unused value.

From-SVN: r228263
2015-09-29 12:31:55 -06:00
Steven G. Kargl bbfe9e0237 2015-09-29 Steven G. Kargl <kargl@gcc.gnu.org>
gfortran.dg/ieee/ieee_4.f90: xfail on i386-*-freebsd*
	gfortran.dg/round_4.f90: ditto.

From-SVN: r228262
2015-09-29 18:08:54 +00:00
Jeff Law ef295bcefe [PATCH] Fix warnings building pdp11 port
* config/pdp11/pdp11.c (pdp11_branch_cost): New function.
	* config/pdp11/pdp11.h (BRANCH_COST): Call function rather than
	inline macro expansion.

From-SVN: r228259
2015-09-29 10:56:04 -06:00
Jeff Law 7bf92e50de [PATCH] Fix building interix targets
* config/i386/t-interix (winnt-stubs.o): Fix compilation rule.

From-SVN: r228258
2015-09-29 10:48:55 -06:00
Jeff Law e3ed8bb710 [PATCH] Fix undefined behaviour in SH port
* config/sh/sh.c (gen_shl_and): Fix undefined left shift
	behaviour.
	(gen_shl_sext): Likewise.
	* config/sh/sh.md (divsi3): Likewise.
	(imm->ext_dest_operand splitter): Likewise.

From-SVN: r228257
2015-09-29 10:41:38 -06:00
Sebastian Pop da68b8f4d2 remove dead code of commutative_reductions
This code is not used anymore after we removed the previous loop optimizer (not
based on the ISL scheduler.)  We will add back the detection of commutative
reductions after we improve the code generation of scalar dependences (by not
going out of SSA for scalar dependences just to expose them to the data
dependence graph.)

Patch passed bootstrap and check on x86_64-linux with ISL-0.15.

2015-09-29  Sebastian Pop  <s.pop@samsung.com>
            Aditya Kumar  <aditya.k7@samsung.com>

            * graphite-sese-to-poly.c (gsi_for_phi_node): Remove.
            (nb_data_writes_in_bb): Remove.
            (split_pbb): Remove.
            (split_reduction_stmt): Remove.
            (is_reduction_operation_p): Remove.
            (phi_contains_arg): Remove.
            (follow_ssa_with_commutative_ops): Remove.
            (detect_commutative_reduction_arg): Remove.
            (detect_commutative_reduction_assign): Remove.
            (follow_inital_value_to_phi): Remove.
            (edge_initial_value_for_loop_phi): Remove.
            (initial_value_for_loop_phi): Remove.
            (used_outside_reduction): Remove.
            (detect_commutative_reduction): Remove.
            (translate_scalar_reduction_to_array_for_stmt): Remove.
            (remove_phi): Remove.
            (dr_indices_valid_in_loop): Remove.
            (close_phi_written_to_memory): Remove.
            (translate_scalar_reduction_to_array): Remove.
            (rewrite_commutative_reductions_out_of_ssa_close_phi): Remove.
            (rewrite_commutative_reductions_out_of_ssa_loop): Remove.
            (rewrite_commutative_reductions_out_of_ssa): Remove.
            (build_poly_scop): Remove call to rewrite_commutative_reductions_out_of_ssa.

Co-Authored-By: Aditya Kumar <aditya.k7@samsung.com>

From-SVN: r228255
2015-09-29 16:33:45 +00:00
Jeff Law a53378d25f [PATCH] Fix undefined behaviour in rx port
[PATCH] Fix undefined behaviour in rx port
        * config/rx/constraints.md (Int08): Fix undefined left shift
        behaviour.
        (Sint08, Sint16, Sint24): Likewise.
        * config/rx/rx.c (rx_get_stack_layout): Likewise.

From-SVN: r228254
2015-09-29 10:32:45 -06:00
Evandro Menezes 5c4b7f1c1c add separate insn sched class for vector LDP & STP
2015-09-29  Evandro Menezes  <e.menezes@samsung.com>

	* config/arm/types.md (neon_ldp, neon_ldp_q, neon_stp, neon_stp_q):
	Add new insn types for vector load and store pairs.
	* config/arm/cortex-a53.md (cortex_a53_f_load_2reg): Add insn
	types "neon_ldp{,_q}".
	* config/arm/cortex-a57.md (neon_load_c): Add insn types
	"neon_ldp{,_q}".
	(neon_store_complex): Add insn types "neon_stp{,_q}".
	* config/aarch64/aarch64-simd.md (aarch64_be_movoi): Add insn types
	"neon_{ldp,stp}_q".

From-SVN: r228253
2015-09-29 16:30:45 +00:00
Jeff Law 187a0dd603 [PATCH] Fix undefined behaviour in rl78 port
[PATCH] Fix undefined behaviour in rl78 port
        * config/rl78/rl78-expand.md (movqi): Fix undefined left shift
        behaviour.

From-SVN: r228252
2015-09-29 10:28:51 -06:00
Jeff Law 3ea7f8e524 [PATCH] Fix undefined behaviour in msp430 port
* config/msp430/msp430.c (msp430_legitimate_constant): Fix undefined
        left shift behaviour.
        * config/msp430/constraints.md ('L' constraint): Similarly.
        ('Ys' constraint): Similarly.

From-SVN: r228251
2015-09-29 10:25:21 -06:00
Jonathan Wakely 6d60110654 Leave errno unchanged by successful std::stoi etc
* include/ext/string_conversions.h (__stoa): Save and restore errno.
	* testsuite/21_strings/basic_string/numeric_conversions/char/errno.cc:
	New.

From-SVN: r228249
2015-09-29 16:15:39 +01:00
Ilya Verbin 44799f87c3 libgomp-plugin-intelmic.cpp (OFFLOAD_ACTIVE_WAIT_ENV): New define.
liboffloadmic/
	* plugin/libgomp-plugin-intelmic.cpp (OFFLOAD_ACTIVE_WAIT_ENV): New
	define.
	(init): Set OFFLOAD_ACTIVE_WAIT env var to 0, if it is not set.
	* runtime/emulator/coi_common.h (PIPE_HOST_PATH): Replace with ...
	(PIPE_HOST2TGT_NAME): ... this.
	(PIPE_TARGET_PATH): Replace with ...
	(PIPE_TGT2HOST_NAME): ... this.
	(MALLOCN): New define.
	(READN): Likewise.
	(WRITEN): Likewise.
	(enum cmd_t): Replace CMD_RUN_FUNCTION with CMD_PIPELINE_RUN_FUNCTION.
	Add CMD_PIPELINE_CREATE, CMD_PIPELINE_DESTROY.
	* runtime/emulator/coi_device.cpp (engine_dir): New static variable.
	(pipeline_thread_routine): New static function.
	(COIProcessWaitForShutdown): Use global engine_dir instead of mic_dir.
	Rename pipe_host and pipe_target to pipe_host2tgt and pipe_tgt2host.
	If cmd is CMD_PIPELINE_CREATE, create a new thread for the pipeline.
	Remove cmd == CMD_RUN_FUNCTION case.
	* runtime/emulator/coi_device.h (COIERRORN): New define.
	* runtime/emulator/coi_host.cpp: Include set, map, queue.
	Replace typedefs with enums and structs.
	(struct Function): Remove name, add num_buffers, bufs_size,
	bufs_data_target, misc_data_len, misc_data, return_value_len,
	return_value, completion_event.
	(struct Callback): New.
	(struct Process): Remove pipeline.  Add pipe_host2tgt and pipe_tgt2host.
	(struct Pipeline): Remove pipe_host and pipe_target.  Add thread,
	destroy, is_destroyed, pipe_host2tgt_path, pipe_tgt2host_path,
	pipe_host2tgt, pipe_tgt2host, queue, process.
	(max_pipeline_num): New static variable.
	(pipelines): Likewise.
	(max_event_num): Likewise.
	(non_signalled_events): Likewise.
	(errored_events): Likewise.
	(callbacks): Likewise.
	(cleanup): Do not check tmp_dirs before free.
	(start_critical_section): New static function.
	(finish_critical_section): Likewise.
	(pipeline_is_destroyed): Likewise.
	(maybe_invoke_callback): Likewise.
	(signal_event): Likewise.
	(get_event_result): Likewise.
	(COIBufferCopy): Rename arguments according to headers.  Add asserts.
	Use process' main pipes, instead of pipeline's pipes.  Signal completion
	event.
	(COIBufferCreate): Rename arguments according to headers.  Add asserts.
	Use process' main pipes, instead of pipeline's pipes.
	(COIBufferCreateFromMemory): Rename arguments according to headers.
	Add asserts.
	(COIBufferDestroy): Rename arguments according to headers.  Add asserts.
	Use process' main pipes, instead of pipeline's pipes.
	(COIBufferGetSinkAddress): Rename arguments according to headers.
	Add asserts.
	(COIBufferMap): Rename arguments according to headers.  Add asserts.
	Signal completion event.
	(COIBufferRead): Likewise.
	(COIBufferSetState): Likewise.
	(COIBufferUnmap): Likewise.
	(COIBufferWrite): Likewise.
	(COIEngineGetCount): Add assert.
	(COIEngineGetHandle): Rename arguments according to headers.
	Add assert.
	(COIEventWait): Rename arguments according to headers.  Add asserts.
	Implement waiting for events with zero or infinite timeout.
	(COIEventRegisterCallback): New function.
	(pipeline_thread_routine): New static function.
	(COIPipelineCreate): Create a new thread for the pipeline.
	(COIPipelineDestroy): Exit pipeline thread.
	(COIPipelineRunFunction): Add the function into pipeline's queue,
	instead running it here.  Wait for it's completion in case of
	synchronous execution.
	(COIProcessCreateFromMemory): Rename arguments according to headers.
	Add asserts.  Create process' main pipes, instead of pipeline's pipes.
	(COIProcessDestroy): Rename arguments according to headers.
	Add asserts.  Destroy all undestroyed pipelines.
	(COIProcessGetFunctionHandles): Rename arguments according to headers.
	Add asserts.  Use process' main pipes, instead of pipeline's pipes.
	Remove useless function names.
	(COIProcessLoadLibraryFromMemory): Add asserts.  Use process' main
	pipes, instead of pipeline's pipes.
	(COIProcessUnloadLibrary): Likewise.
	(COIEngineGetInfo): Add assert.
	* runtime/emulator/coi_host.h (COIERRORN): New define.

From-SVN: r228248
2015-09-29 14:11:16 +00:00
Jonathan Wakely b59882293f PR libstdc++/67583 Fix invalid sputn calls in tests
PR libstdc++/67583
	* testsuite/27_io/basic_stringbuf/seekoff/char/1.cc: Fix sputn call
	with mismatched arguments.
	* testsuite/27_io/basic_stringbuf/seekoff/wchar_t/1.cc: Likewise.

From-SVN: r228245
2015-09-29 14:31:51 +01:00
Richard Biener e7cbc0960e re PR fortran/67170 (PRE can't hoist out a readonly argument)
2015-09-29  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/67170
	* tree-ssa-alias.h (get_continuation_for_phi): Adjust
	the translate function pointer parameter to get the
	bool whether to disambiguate only by reference.
	(walk_non_aliased_vuses): Likewise.
	* tree-ssa-alias.c (maybe_skip_until): Adjust.
	(get_continuation_for_phi_1): Likewise.
	(get_continuation_for_phi): Likewise.
	(walk_non_aliased_vuses): Likewise.
	* tree-ssa-sccvn.c (const_parms): New bitmap.
	(vn_reference_lookup_3): Adjust for interface change.
	Disambiguate parameters pointing to readonly memory.
	(free_scc_vn): Free const_parms.
	(run_scc_vn): Initialize const_parms from a fn spec attribute.

	* gfortran.dg/pr67170.f90: New testcase.

From-SVN: r228244
2015-09-29 13:04:18 +00:00
Richard Biener eada851cc9 re PR tree-optimization/67741 (Invalid built-in usage should not cause segmentation fault in compiler)
2015-09-29  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/67741
	* tree-ssa-math-opts.c (pass_cse_sincos::execute): Only recognize
	builtin calls with correct signature.

	* gcc.dg/torture/pr67741.c: New testcase.

From-SVN: r228243
2015-09-29 13:02:42 +00:00
Jonathan Wakely ce535a9685 Reduce space and time overhead of std::thread
PR libstdc++/65393
	* config/abi/pre/gnu.ver: Export new symbols.
	* include/std/thread (thread::_State, thread::_State_impl): New types.
	(thread::_M_start_thread): Add overload taking unique_ptr<_State>.
	(thread::_M_make_routine): Remove.
	(thread::_S_make_state): Add.
	(thread::_Impl_base, thread::_Impl, thread::_M_start_thread)
	[_GLIBCXX_THREAD_ABI_COMPAT] Only declare conditionally.
	* src/c++11/thread.cc (execute_native_thread_routine): Rename to
	execute_native_thread_routine_compat and re-define to use _State.
	(thread::_State::~_State()): Define.
	(thread::_M_make_thread): Define new overload.
	(thread::_M_make_thread) [_GLIBCXX_THREAD_ABI_COMPAT]: Only define old
	overloads conditionally.

From-SVN: r228242
2015-09-29 13:54:05 +01:00
Uros Bizjak c357b903da tg-tests.h (foo_1): Also check if f and ld are non-zero for __builtin_signbit tests.
* gcc.dg/tg-tests.h (foo_1) [UNSAFE]: Also check if f and ld are
	non-zero for __builtin_signbit tests.

From-SVN: r228240
2015-09-29 13:21:46 +02:00
Ilya Enkovich 006ba5047c re PR target/65105 ([i386] XMM registers are not used for 64bit computations on 32bit target)
gcc/

	PR target/65105
	* config/i386/i386.c: Include dbgcnt.h.
	(has_non_address_hard_reg): New.
	(convertible_comparison_p): New.
	(scalar_to_vector_candidate_p): New.
	(remove_non_convertible_regs): New.
	(scalar_chain): New.
	(scalar_chain::scalar_chain): New.
	(scalar_chain::~scalar_chain): New.
	(scalar_chain::add_to_queue): New.
	(scalar_chain::mark_dual_mode_def): New.
	(scalar_chain::analyze_register_chain): New.
	(scalar_chain::add_insn): New.
	(scalar_chain::build): New.
	(scalar_chain::compute_convert_gain): New.
	(scalar_chain::replace_with_subreg): New.
	(scalar_chain::replace_with_subreg_in_insn): New.
	(scalar_chain::emit_conversion_insns): New.
	(scalar_chain::make_vector_copies): New.
	(scalar_chain::convert_reg): New.
	(scalar_chain::convert_op): New.
	(scalar_chain::convert_insn): New.
	(scalar_chain::convert): New.
	(convert_scalars_to_vector): New.
	(pass_data_stv): New.
	(pass_stv): New.
	(make_pass_stv): New.
	(ix86_option_override): Created and register stv pass.
	(flag_opts): Add -mstv.
	(ix86_option_override_internal): Likewise.
	* config/i386/i386.md (SWIM1248x): New.
	(*movdi_internal): Add xmm to mem alternative for TARGET_STV.
	(and<mode>3): Use SWIM1248x iterator instead of SWIM.
	(*anddi3_doubleword): New.
	(*zext<mode>_doubleword): New.
	(*zextsi_doubleword): New.
	(<code><mode>3): Use SWIM1248x iterator instead of SWIM.
	(*<code>di3_doubleword): New.
	* config/i386/i386.opt (mstv): New.
	* dbgcnt.def (stv_conversion): New.

gcc/testsuite/

	PR target/65105
	* gcc.target/i386/pr65105-1.c: New.
	* gcc.target/i386/pr65105-2.c: New.
	* gcc.target/i386/pr65105-3.c: New.
	* gcc.target/i386/pr65105-4.C: New.
	* gcc.dg/lower-subreg-1.c: Add -mno-stv options for ia32.

From-SVN: r228231
2015-09-29 09:32:40 +00:00
Tom de Vries 2943f6f716 Dump function attributes
2015-09-29  Tom de Vries  <tom@codesourcery.com>

	* tree-cfg.c (dump_function_to_file): Dump function attributes.

From-SVN: r228229
2015-09-29 05:41:09 +00:00
Kaz Kojima 4c22199569 re PR target/67716 ([5] [SH]: Miscompiles libraw: Assembler: unaligned opcodes detected in executable segment)
PR target/67716
* [SH] Implement targetm.override_options_after_change hook
  so to avoid resetting loop, jump and function alignment values with
  function-wise optimization flags.

From-SVN: r228228
2015-09-29 05:36:01 +00:00
Segher Boessenkool 3179619d50 Fix gcc.dg/asm-4.c
Double-quoted words in Tcl have substitutions performed on them, including
backslash substitutions.  That isn't terribly nice for regular expressions,
so use braced words instead.


2015-09-28  Segher Boessenkool  <segher@kernel.crashing.org>

gcc/testsuite/
	* gcc.dg/asm-4.c: Use braced words for the regular expressions.

From-SVN: r228227
2015-09-29 02:56:03 +02:00
GCC Administrator efba6099b2 Daily bump.
From-SVN: r228226
2015-09-29 00:16:13 +00:00
Joseph Myers 30954527b7 Update soft-fp from glibc.
This patch updates the soft-fp code in libgcc from glibc.  There are
no changes here of significance to the use of soft-fp in GCC (and so
no testsuite additions); it's simply an update to bring in the latest
soft-fp version (which will also hopefully go into Linux 4.4 to
replace the 15-year-old copy currently in Linux).

Bootstrapped with no regressions on x86_64-pc-linux-gnu.

	* soft-fp/adddf3.c: Update from glibc.
	* soft-fp/addsf3.c: Likewise.
	* soft-fp/addtf3.c: Likewise.
	* soft-fp/divdf3.c: Likewise.
	* soft-fp/divsf3.c: Likewise.
	* soft-fp/divtf3.c: Likewise.
	* soft-fp/double.h: Likewise.
	* soft-fp/eqdf2.c: Likewise.
	* soft-fp/eqsf2.c: Likewise.
	* soft-fp/eqtf2.c: Likewise.
	* soft-fp/extenddftf2.c: Likewise.
	* soft-fp/extended.h: Likewise.
	* soft-fp/extendsfdf2.c: Likewise.
	* soft-fp/extendsftf2.c: Likewise.
	* soft-fp/extendxftf2.c: Likewise.
	* soft-fp/fixdfdi.c: Likewise.
	* soft-fp/fixdfsi.c: Likewise.
	* soft-fp/fixdfti.c: Likewise.
	* soft-fp/fixsfdi.c: Likewise.
	* soft-fp/fixsfsi.c: Likewise.
	* soft-fp/fixsfti.c: Likewise.
	* soft-fp/fixtfdi.c: Likewise.
	* soft-fp/fixtfsi.c: Likewise.
	* soft-fp/fixtfti.c: Likewise.
	* soft-fp/fixunsdfdi.c: Likewise.
	* soft-fp/fixunsdfsi.c: Likewise.
	* soft-fp/fixunsdfti.c: Likewise.
	* soft-fp/fixunssfdi.c: Likewise.
	* soft-fp/fixunssfsi.c: Likewise.
	* soft-fp/fixunssfti.c: Likewise.
	* soft-fp/fixunstfdi.c: Likewise.
	* soft-fp/fixunstfsi.c: Likewise.
	* soft-fp/fixunstfti.c: Likewise.
	* soft-fp/floatdidf.c: Likewise.
	* soft-fp/floatdisf.c: Likewise.
	* soft-fp/floatditf.c: Likewise.
	* soft-fp/floatsidf.c: Likewise.
	* soft-fp/floatsisf.c: Likewise.
	* soft-fp/floatsitf.c: Likewise.
	* soft-fp/floattidf.c: Likewise.
	* soft-fp/floattisf.c: Likewise.
	* soft-fp/floattitf.c: Likewise.
	* soft-fp/floatundidf.c: Likewise.
	* soft-fp/floatundisf.c: Likewise.
	* soft-fp/floatunditf.c: Likewise.
	* soft-fp/floatunsidf.c: Likewise.
	* soft-fp/floatunsisf.c: Likewise.
	* soft-fp/floatunsitf.c: Likewise.
	* soft-fp/floatuntidf.c: Likewise.
	* soft-fp/floatuntisf.c: Likewise.
	* soft-fp/floatuntitf.c: Likewise.
	* soft-fp/gedf2.c: Likewise.
	* soft-fp/gesf2.c: Likewise.
	* soft-fp/getf2.c: Likewise.
	* soft-fp/ledf2.c: Likewise.
	* soft-fp/lesf2.c: Likewise.
	* soft-fp/letf2.c: Likewise.
	* soft-fp/muldf3.c: Likewise.
	* soft-fp/mulsf3.c: Likewise.
	* soft-fp/multf3.c: Likewise.
	* soft-fp/negdf2.c: Likewise.
	* soft-fp/negsf2.c: Likewise.
	* soft-fp/negtf2.c: Likewise.
	* soft-fp/op-1.h: Likewise.
	* soft-fp/op-2.h: Likewise.
	* soft-fp/op-4.h: Likewise.
	* soft-fp/op-8.h: Likewise.
	* soft-fp/op-common.h: Likewise.
	* soft-fp/quad.h: Likewise.
	* soft-fp/single.h: Likewise.
	* soft-fp/soft-fp.h: Likewise.
	* soft-fp/subdf3.c: Likewise.
	* soft-fp/subsf3.c: Likewise.
	* soft-fp/subtf3.c: Likewise.
	* soft-fp/truncdfsf2.c: Likewise.
	* soft-fp/trunctfdf2.c: Likewise.
	* soft-fp/trunctfsf2.c: Likewise.
	* soft-fp/trunctfxf2.c: Likewise.
	* soft-fp/unorddf2.c: Likewise.
	* soft-fp/unordsf2.c: Likewise.
	* soft-fp/unordtf2.c: Likewise.

From-SVN: r228223
2015-09-28 22:50:22 +01:00
Paul Thomas 79124116d6 [multiple changes]
2015-09-28  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/40054
	PR fortran/63921
	* decl.c (get_proc_name): Return if statement function is
	found.
	* expr.c (gfc_check_vardef_context): Add error return for
	derived type expression lacking the derived type itself.
	* match.c (gfc_match_ptr_fcn_assign): New function.
	* match.h : Add prototype for gfc_match_ptr_fcn_assign.
	* parse.c : Add static flag 'in_specification_block'.
	(decode_statement): If in specification block match a statement
	function, then, if no error arising from statement function
	matching, try to match pointer function assignment.
	(parse_interface): Set 'in_specification_block' on exiting from
	parse_spec.
	(parse_spec): Set and then reset 'in_specification_block'.
	(gfc_parse_file): Set 'in_specification_block'.
	* resolve.c (get_temp_from_expr): Extend to include functions
	and array constructors as rvalues..
	(resolve_ptr_fcn_assign): New function.
	(gfc_resolve_code): Call it on finding a pointer function as an
	lvalue. If valid or on error, go back to start of resolve_code.
	* symbol.c (gfc_add_procedure): Add a sentence to the error to
	flag up the ambiguity between a statement function and pointer
	function assignment at the end of the specification block.

2015-09-28  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/40054
	PR fortran/63921
	* gfortran.dg/fmt_tab_1.f90: Change from run to compile and set
	standard as legacy.
	* gfortran.dg/fmt_tab_2.f90: Add extra tab error.
	* gfortran.dg/function_types_3.f90: Change error message to
	"Type inaccessible...."
	* gfortran.dg/ptr_func_assign_1.f08: New test.
	* gfortran.dg/ptr_func_assign_2.f08: New test.

2015-09-25  Mikael Morin  <mikael.morin@sfr.fr>

	PR fortran/40054
	PR fortran/63921
	* gfortran.dg/ptr_func_assign_3.f08: New test.
	* gfortran.dg/ptr_func_assign_4.f08: New test.

From-SVN: r228222
2015-09-28 21:18:38 +00:00
Nathan Sidwell 3e32ee19a5 gomp-constants.h (GOMP_VERSION_NVIDIA_PTX): Increment.
inlude/
	* gomp-constants.h (GOMP_VERSION_NVIDIA_PTX): Increment.
	(GOMP_DIM_GANG, GOMP_DIM_WORKER, GOMP_DIM_VECTOR, GOMP_DIM_MAX,
	GOMP_DIM_MASK): New.
	(GOMP_LAUNCH_DIM, GOMP_LAUNCH_ASYNC, GOMP_LAUNCH_WAIT): New.
	(GOMP_LAUNCH_CODE_SHIFT, GOMP_LAUNCH_DEVICE_SHIFT,
	GOMP_LAUNCH_OP_SHIFT): New.
	(GOMP_LAUNCH_PACK, GOMP_LAUNCH_CODE, GOMP_LAUNCH_DEVICE,
	GOMP_LAUNCH_OP): New.
	(GOMP_LAUNCH_OP_MAX): New.

	libgomp/
	* libgomp.h (acc_dispatch_t): Replace separate geometry args with
	array.
	* libgomp.map (GOACC_parallel_keyed): New.
	* oacc-parallel.c (goacc_wait): Take pointer to va_list.  Adjust
	all callers.
	(GOACC_parallel_keyed): New interface.  Lose geometry arguments
	and take keyed varargs list.  Adjust call to exec_func.
	(GOACC_parallel): Force host fallback.
	* libgomp_g.h (GOACC_parallel): Remove.
	(GOACC_parallel_keyed): Declare.
	* plugin/plugin-nvptx.c (struct targ_fn_launch): New struct.
	(stuct targ_gn_descriptor): Replace name field with launch field.
	(nvptx_exec): Lose separate geometry args, take array.  Process
	dynamic dimensions and adjust.
	(struct nvptx_tdata): Replace fn_names field with fn_descs.
	(GOMP_OFFLOAD_load_image): Adjust for change in function table
	data.
	(GOMP_OFFLOAD_openacc_parallel): Adjust for change in dimension
	passing.
	* oacc-host.c (host_openacc_exec): Adjust for change in dimension
	passing.

	gcc/
	* config/nvptx/nvptx.c: Include omp-low.h and gomp-constants.h.
	(nvptx_record_offload_symbol): Record function execution geometry.
	* config/nvptx/mkoffload.c (process): Include launch geometry in
	function data.
	* omp-low.c (oacc_launch_pack): New.
	(replace_oacc_fn_attrib): New.
	(set_oacc_fn_attrib): New.
	(get_oacc_fn_attrib): New.
	(expand_omp_target): Create keyed varargs for GOACC_parallel call
	generation.
	* omp-low.h (get_oacc_fn_attrib): Declare.
	* builtin-types.def (DEF_FUNCTION_TyPE_VAR_6): New.
	(DEF_FUNCTION_TYPE_VAR_11): Delete.
	* tree.h (OMP_CLAUSE_EXPR): New.
	* omp-builtins.def (BUILT_IN_GOACC_PARALLEL): Change target fn name.

	gcc/lto/
	* lto-lang.c (DEF_FUNCTION_TYPE_VAR_6): New.
	(DEF_FUNCTION_TYPE_VAR_11): Delete.

	gcc/c-family/
	* c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
	(DEF_FUNCTION_TYPE_VAR_11): Delete.

	gcc/fortran/
	* f95-lang.c (DEF_FUNCTION_TYPE_VAR_6): New.
	(DEF_FUNCTION_TYPE_VAR_11): Delete.
	* types.def (DEF_FUNCTION_TYPE_VAR_6): New.
	(DEF_FUNCTION_TYPE_VAR_11): Delete.

	gcc/ada/
	* gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_6): Define

From-SVN: r228220
2015-09-28 19:37:33 +00:00
Jeff Law 4e671509d9 Re: [PATCH] Fix undefined behaviour in arc port
Re: [PATCH] Fix undefined behaviour in arc port
        * config/arc/arc.c (arc_legitimize_reload_address): Fix stupid
        thinko in last change.
        * config/arc/constraints.md (C2a): Fix typos in last change.

From-SVN: r228219
2015-09-28 13:27:29 -06:00
Aditya Kumar d95fc58421 fix bootstrap due to unused variable warning
* sese.c (invariant_in_sese_p_rec): Remove unused variable.

Co-Authored-By: Sebastian Pop <s.pop@samsung.com>

From-SVN: r228218
2015-09-28 19:19:47 +00:00
Jonathan Wakely 80400b0477 LWG 2135: terminate() in condition_variable::wait()
* include/std/condition_variable (condition_variable::wait): Add
	noexcept.
	* src/c++11/condition_variable.cc (condition_variable::wait): Call
	std::terminate on error (DR 2135).

From-SVN: r228217
2015-09-28 19:44:40 +01:00
Sebastian Pop 7009b073c5 Redesign Graphite scop detection
Redesign Graphite scop detection for faster compiler time and detecting more SCoPs.

Existing algorithm for SCoP detection in graphite was based on dominator tree
where a tree (CFG) traversal was required for analyzing an SESE. The tree
traversal is linear in the number of basic blocks and SCoP detection is
(probably) linear in number of instructions. That algorithm utilized a generic
infrastructure of SESE which does not directly represent loops.  With regards to
graphite framework, we are only interested in subtrees with loops. The new
algorithm is geared towards tree traversal on loop structure. The algorithm is
linear in number of loops which is faster than the previous algorithm.

Briefly, we start the traversal at a loop-nest and analyze it recursively for
validity. Once a valid loop is found we find a valid adjacent loop. If an
adjacent loop is found and is valid, we merge both loop nests otherwise we form
a SCoP from the previous loop nest, and resume the algorithm from the adjacent
loop nest. The data structure to represent an SESE is an ordered pair of edges
(entry, exit). The new algoritm can extend a SCoP in both the directions. With
this approach, the number of instructions to be analyzed for validity reduces to
a minimal set.  We start by analyzing those statements which are inside a loop,
because validity of those statements is necessary for the validity of loop. The
statements outside the loop nest can be just excluded from the SESE if they are
not valid.

This patch depends on: https://gcc.gnu.org/ml/gcc-patches/2015-09/msg02024.html

Passes (c,c++,fortran) regtest and bootstrap.

gcc/ChangeLog:

2015-09-27  Aditya Kumar  <hiraditya@msn.com>
            Sebastian Pop  <s.pop@samsung.com>
        * graphite-optimize-isl.c (optimize_isl):
        * graphite-scop-detection.c (struct sese_l): New type.
        (get_entry_bb): API for getting entry bb of SESE.
        (get_exit_bb): API for getting exit bb of SESE.
        (class debug_printer): New type. Simple printer in debug mode.
        (trivially_empty_bb_p): New. Return true when BB is empty or
	contains only debug instructions.
        (graphite_can_represent_expr): Call scalar_evoution_in_region
	instead of analyze_scalar_evolution. Pass in scop instead of only
	the scop entry.
        (stmt_has_simple_data_refs_p): Pass in scop instead of only the
	scop entry.
        (stmt_simple_for_scop_p): Same.
        (harmful_stmt_in_bb): Same.
        (graphite_can_represent_loop): Deleted.
        (struct scopdet_info): Deleted.
        (scopdet_basic_block_info): Deleted.
        (build_scops_1): Deleted.
        (bb_in_sd_region): Deleted.
        (find_single_entry_edge): Deleted.
        (find_single_exit_edge): Deleted.
        (create_single_entry_edge): Deleted.
        (sd_region_without_exit): Deleted.
        (create_single_exit_edge): Deleted.
        (unmark_exit_edges): Deleted.
        (mark_exit_edges): Deleted.
        (create_sese_edges): Deleted.
        (build_graphite_scops): Deleted.
        (canonicalize_loop_closed_ssa): Recompute all dominators at the
	end.
        (build_scops): Use the new scop_builder to build scops.
        (dot_all_scops_1): Use the new pretty printer. Print loop father
	as well.
        (loop_body_is_valid_scop): New. Return true if loop body is a
	valid scop.
        (class scop_builder): New. Builds SCoPs for polyhedral
	optimizatios.
        (scop_builder): New. Constructor.
        (static sese_l invalid_sese): sese_l with invalid edges.
        (get_sese): Get an sese (from a loop) if possible, invalid_sese
	otherwise.
        (get_nearest_dom_with_single_entry): Get nearest dominator of a
	basic_block with single entry. Return NULL if we get to the
	beginning of a function.
        (get_nearest_pdom_with_single_exit): Get nearest post-dominator of
	a basic_block with single exit. Return NULL if we get to the
	beginning of a function.
        (print_sese): Pretty-print SESE.
        (merge_sese): Merge two SESEs if possible and return the new SESE.
        (build_scop_depth): Start building the SCoP within a loop nest.
        (build_scop_breadth): Start building the SCoP at a single loop
	depth. Merge adjacent SESEs if valid.
        (can_represent_loop_1): Returns true if Graphite can represent
	loop inside SCoP. Helper for can_represent_loop.
        (can_represent_loop): Returns true if Graphite can represent LOOP
	and all its nested loops in SCoP.
        (loop_is_valid_scop): Returns true if LOOP and all its nests
	constitute a valid SCoP.
        (region_has_one_loop): Returns true of a region has only one loop.
        (add_scop): Add SCoP to the list of valid scops. Removes an
	already existing scop if it intersects with or subsumed by this
	one.
        (harmful_stmt_in_region): Returns true if SCoP has any statment
	which cannot be represented by Graphite.
        (subsumes): Returns true of SCoP S1 subsumes SCoP S2.
        (remove_subscops): Remove any SCoP from the list of already found
	SCoPs, if subsumed by S1.
        (intersects): Return true if region bounded by SCoPs S1 and S2
	intersect.
        (remove_intersecting_scops): Remove any SCoP which intersects with
	S1.
        * graphite.c (print_graphite_scop_statistics):
        (print_graphite_statistics): Print SCoP info while debugging.
        (graphite_initialize): Early exit in case number of loops in a
	function is less than PARAM_GRAPHITE_MIN_LOOPS_PER_FUNCTION or
	basic blocks are more than PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION.
        (graphite_finalize):
        * params.def: Add PARAM_GRAPHITE_MIN_LOOPS_PER_FUNCTION.
        * sese.h (sese_loop_depth): Remove unnecessary gcc_assert.
        (recompute_all_dominators): Recalculate POST_DOMINATORS.
        * tree-cfg.c (print_loops): Print the function name while printing
	loops.

gcc/testsuite/ChangeLog:

2015-09-27  Aditya Kumar  <hiraditya@msn.com>
            Sebastian Pop  <s.pop@samsung.com>
        * gcc.dg/graphite/block-1.c: Modified to match the pattern.
        * gcc.dg/graphite/block-3.c: Same.
        * gcc.dg/graphite/block-4.c: Same.
        * gcc.dg/graphite/block-5.c: Same.
        * gcc.dg/graphite/block-6.c: Same.
        * gcc.dg/graphite/block-7.c: Same.
        * gcc.dg/graphite/block-8.c: Same.
        * gcc.dg/graphite/block-pr47654.c: Same.
        * gcc.dg/graphite/interchange-0.c: Same.
        * gcc.dg/graphite/interchange-1.c: Same.
        * gcc.dg/graphite/interchange-10.c: Same.
        * gcc.dg/graphite/interchange-11.c: Same.
        * gcc.dg/graphite/interchange-12.c: Same.
        * gcc.dg/graphite/interchange-13.c: Same.
        * gcc.dg/graphite/interchange-14.c: Same.
        * gcc.dg/graphite/interchange-15.c: Same.
        * gcc.dg/graphite/interchange-3.c: Same.
        * gcc.dg/graphite/interchange-4.c: Same.
        * gcc.dg/graphite/interchange-5.c: Same.
        * gcc.dg/graphite/interchange-6.c: Same.
        * gcc.dg/graphite/interchange-7.c: Same.
        * gcc.dg/graphite/interchange-8.c: Same.
        * gcc.dg/graphite/interchange-9.c: Same.
        * gcc.dg/graphite/interchange-mvt.c: Same.
        * gcc.dg/graphite/pr35356-1.c (foo): Same.
        * gcc.dg/graphite/pr35356-3.c: Same.
        * gcc.dg/graphite/pr37485.c: Same.
        * gcc/testsuite/gcc.dg/graphite/run-id-pr67700-1.c: New test case.
        * gcc.dg/graphite/scop-1.c (int toto): Modified to match the pattern.
        * gcc.dg/graphite/scop-11.c: Same.
        * gcc.dg/graphite/scop-5.c: Same.
        * gcc.dg/graphite/uns-block-1.c: Same.
        * gcc.dg/graphite/uns-interchange-9.c: Same.
        * gfortran.dg/graphite/block-1.f90: Same.
        * gfortran.dg/graphite/interchange-3.f90: Same.
        * gfortran.dg/graphite/pr14741.f90: Same.

From-SVN: r228215
2015-09-28 17:30:09 +00:00
Aditya Kumar d5b5a232d4 re PR tree-optimization/67700 ([graphite] miscompile due to wrong codegen)
fix PR67700

The patch makes the detection of scop parameters in parameter_index_in_region a
bit more conservative by discarding scalar variables defined in function of data
references defined in the scop.

2015-09-25  Aditya Kumar  <aditya.k7@samsung.com>
                Sebastian Pop  <s.pop@samsung.com>

                PR tree-optimization/67700
                * graphite-sese-to-poly.c (parameter_index_in_region): Call
                invariant_in_sese_p_rec.
                (extract_affine): Same.
                (rewrite_cross_bb_scalar_deps): Call update_ssa.
                * sese.c (invariant_in_sese_p_rec): Export.  Handle vdefs and vuses.
                * sese.h (invariant_in_sese_p_rec): Declare.

                * testsuite/gcc.dg/graphite/run-id-pr67700.c: New.

Co-Authored-By: Sebastian Pop <s.pop@samsung.com>

From-SVN: r228214
2015-09-28 17:29:59 +00:00
David Wohlferd 0a53bd6d4d extend.texi (Asm Labels): Break out text for data vs functions.
2015-09-28  David Wohlferd  <dw@LimeGreenSocks.com>

         * doc/extend.texi (Asm Labels): Break out text for data vs
	 functions.

From-SVN: r228212
2015-09-28 12:45:31 -04:00
Jiong Wang 2876a13f6c [AArch64] Revert "Improve TLS Descriptor pattern to release RTL loop IV opt"
2015-09-28  Jiong Wang  <jiong.wang@arm.com>

	Revert:
	2015-08-06  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
		    Jiong Wang  <jiong.wang@arm.com>

	* config/aarch64/aarch64.d (tlsdesc_small_pseudo_<mode>): New pattern.
	* config/aarch64/aarch64.h (reg_class): New enumeration FIXED_REG0.
	(REG_CLASS_NAMES): Likewise.
	(REG_CLASS_CONTENTS): Likewise.
	* config/aarch64/aarch64.c (aarch64_class_max_nregs): Likewise.
	(aarch64_register_move_cost): Likewise.
	(aarch64_load_symref_appropriately): Invoke the new added pattern if
	possible.
	* config/aarch64/constraints.md (Uc0): New constraint.

From-SVN: r228211
2015-09-28 16:16:43 +00:00
Ilya Verbin db7b65ff72 re PR other/67652 (liboffloadmic/runtime/offload_engine.cpp:176: strange expression in sizeof ?)
PR other/67652
liboffloadmic/
	* runtime/offload_engine.cpp (Engine::init_process): Fix sizeof.

From-SVN: r228210
2015-09-28 16:10:16 +00:00
Daniel Hellstrom 070fb1f63b Now that muser-mode is default the multilib definitions does not require to specify that switch any more.
Now that muser-mode is default the multilib definitions does not require to
specify that switch any more. Add UT699 to multilib after recent patches. Add
AT697F multilib since there are many LEON2 users running RTEMS. Add leon to
multilib too.

gcc/
	* config/sparc/t-rtems: Remove -muser-mode. Add ut699, at697f and leon.

From-SVN: r228204
2015-09-28 16:59:44 +02:00
David Edelsohn 951ed92393 rs6000.c (rs6000_xcoff_asm_named_section): Place SECTION_EXCLUDE in XO mapping class.
* config/rs6000/rs6000.c (rs6000_xcoff_asm_named_section): Place
SECTION_EXCLUDE in XO mapping class.

From-SVN: r228203
2015-09-28 10:44:57 -04:00
Oleg Endo 6fb917d907 re PR target/54236 ([SH] Improve addc and subc insn utilization)
gcc/
	PR target/54236
	* config/sh/predicates.md (t_reg_operand, negt_reg_operand): Allow
	and handle ne and eq codes.
	* config/sh/sh.c (sh_rtx_costs): Adjust matching of tst #imm,r0 insn.
	(sh_recog_treg_set_expr): Early accept negt_reg_operand.  Eearly reject
	CONST_INT_P.  Use reverse_condition.
	(sh_split_treg_set_expr): Likewise.

gcc/testsuite/
	PR target/54236
	* gcc.target/sh/pr54236-1.c (test_09, test_10, test_11): New.
	* gcc.target/sh/pr59533-1.c (test_23, test_24, test_25, test_26,
	test_27): New.
	* gcc.target/sh/pr54236-5.c: New.
	* gcc.target/sh/pr54236-6.c: New.

From-SVN: r228202
2015-09-28 14:00:44 +00:00
James Greenhalgh b81f1ee3b3 [Patch 1/2 AArch64/ARM] Give AArch64 ROR (Immediate) a new type attribute
gcc/

	* config/arm/types.md (type): Add rotate_imm.
	* config/aarch64/aarch64.md (*ror<mode>3_insn): Split out the
	ROR immediate case.
	(*rorsi3_insn_uxtw): Likewise.
	* config/aarch64/thunderx.md (thunderx_shift): Add rotate_imm.
	* config/arm/cortex-a53.md (cortex_a53_alu_shift): Add rotate_imm.
	* config/arm/cortex-a57.md (cortex_a53_alu): Add rotate_imm.

From-SVN: r228197
2015-09-28 09:35:46 +00:00
Tom de Vries 6d259b8d1f Add missing PR line in ChangeLog entry
From-SVN: r228196
2015-09-28 08:48:46 +00:00
Kyrylo Tkachov 2e73b8fe52 [RTL-ifcvt] PR rtl-optimization/67481: Look more deeply for CCmode sets during if-covnersion
PR rtl-optimization/67481
	* ifcvt.c (contains_ccmode_rtx_p): New function.
	(insn_valid_noce_process_p): Use it.

From-SVN: r228195
2015-09-28 08:25:36 +00:00
Kyrylo Tkachov 470512c31b [RTL-ifcvt] PR rtl-optimization/67465: Handle pairs of complex+simple blocks and empty blocks more gracefully
PR rtl-optimization/67456
        PR rtl-optimization/67464
        PR rtl-optimization/67465
        * ifcvt.c (noce_try_cmove_arith): Bail out if cannot conditionally
        move in the mode of x.  Handle combination of complex and simple
        block pairs as well as the case when one is empty.

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

From-SVN: r228194
2015-09-28 08:23:47 +00:00
Tom de Vries a681b758e9 Add gcc.dg/vect/pr62171.c
2015-09-28  Tom de Vries  <tom@codesourcery.com>

	* gcc.dg/vect/pr62171.c: New test.

From-SVN: r228193
2015-09-28 08:19:42 +00:00
Trevor Saunders 7b95476612 update a few places for the change from gimple_statement_base to gimple
gcc/ChangeLog:

2015-09-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* doc/gimple.texi: Update references to gimple_statement_base.
	* gdbhooks.py: Likewise.
	* gimple.h: Likewise.

From-SVN: r228192
2015-09-28 06:26:21 +00:00
Daniel Cederman 8b1785f0fa Use leon3 target for native LEON on Linux.
2015-09-28  Daniel Cederman  <cederman@gaisler.com>

Use leon3 target for native LEON on Linux. Linux requires LEON version 3 or
above with CASA support.

gcc/
	* config/sparc/driver-sparc.c: map LEON to leon3

From-SVN: r228185
2015-09-28 07:34:24 +02:00
Daniel Cederman a01a33a2dd Make muser-mode the default for LEON3
2015-09-28  Daniel Cederman  <cederman@gaisler.com>

Make muser-mode the default for LEON3

The muser-mode flag causes the CASA instruction for LEON3 to use the
user mode ASI. This is the correct behavior for almost all LEON3 targets.
For this reason it makes sense to make user mode the default.

gcc/
	* config/sparc/sparc.opt: Rename mask from USER_MODE to SV_MODE
	  and make it inverse to change default
	* config/sparc/sync.md: Only use supervisor ASI for CASA when in
	  supervisor mode
	* doc/invoke.texi: Document change of default

From-SVN: r228184
2015-09-28 07:30:31 +02:00
Daniel Cederman 9cb00eb15a Do not use floating point registers when compiling with -msoft-float for SPARC
2015-09-28  Daniel Cederman  <cederman@gaisler.com>

Do not use floating point registers when compiling with -msoft-float for SPARC

__builtin_apply* and __builtin_return accesses the floating point registers on
SPARC even when compiling with -msoft-float.

gcc/
	* config/sparc/sparc.c (sparc_function_value_regno_p): Do not return
	true on %f0 for a target without FPU.
	* config/sparc/sparc.md (untyped_call): Do not save %f0 for a target
	without FPU.
	(untyped_return): Do not load %f0 for a target without FPU.

From-SVN: r228183
2015-09-28 07:26:34 +02:00
Andrew Pinski 65629a2406 aarch64.md (prefetch): Change the predicate of operand 0 to register_operand.
2015-09-28  Andrew Pinski  <apinski@cavium.com>    

	* config/aarch64/aarch64.md (prefetch):
	Change the predicate of operand 0 to register_operand.

From-SVN: r228182
2015-09-28 05:22:36 +00:00
GCC Administrator 787541ae57 Daily bump.
From-SVN: r228181
2015-09-28 00:16:13 +00:00
Uros Bizjak 846e2ad83c predicates.md (register_sse4nonimm_operand): New predicate.
* config/i386/predicates.md (register_sse4nonimm_operand): New
	predicate.
	* config/i386/sse.md (PEXTR_MODE12): New mode iterator.
	(*vec_extract<mode>): Use PEXTR_MODE12 instead of VI12_128 mode.
	Use register_sse4nonimm_operand as operand 0 predicate.
	(*vec_extractv8hi_sse2): Remove insn pattern.
	(*vec_extract<PEXTR_MODE12:mode>_zext): Merge insn pattern from
	*vec_extractv8hi_zext and *vec_extractv16qi_zext patterns.

From-SVN: r228178
2015-09-27 20:02:36 +02:00
David Edelsohn f9e807369f pr44641.C: Revert line number change.
* g++.dg/debug/dwarf2/pr44641.C: Revert line number change. Remove
        skip on AIX.  XFAIL individual line tests.

From-SVN: r228177
2015-09-27 13:31:11 -04:00
Oleg Endo a981b74355 re PR target/67391 ([SH] Convert clrt addc to normal add insn)
gcc/
	PR target/67391
	* config/sh/sh-protos.h (sh_lra_p): Declare.
	* config/sh/sh.c (sh_lra_p): Make non-static.
	* config/sh/sh.md (addsi3): Use arith_reg_dest for operands[0] and
	arith_reg_operand for operands[1].  Remove TARGET_SHMEDIA case.
	Expand into addsi3_scr if operands[2] if needed.
	(*addsi3_compact): Rename to *addsi3_compact_lra.  Use
	arith_reg_operand for operands[1].  Allow it only when LRA is enabled.
	(addsi3_scr, *addsi3): New insn_and_split patterns.

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

From-SVN: r228176
2015-09-27 11:55:55 +00:00