Thomas Schwinge [Wed, 28 Jan 2015 17:03:44 +0000 (18:03 +0100)]
nvptx mkoffload.
gcc/
* config/nvptx/mkoffload.c: New file.
* config/nvptx/t-nvptx: Add build rules for it.
* config.gcc <nvptx-*> [$enable_as_accelerator = yes]
(extra_programs): Add mkoffload.
* config/nvptx/nvptx.c (nvptx_record_offload_symbol): New
function.
(TARGET_RECORD_OFFLOAD_SYMBOL): Define macro to use it.
Jonathan Wakely [Wed, 28 Jan 2015 15:02:28 +0000 (15:02 +0000)]
re PR libstdc++/64828 (libstdc++-v3/libsupc++/del_opvs.cc:30:1: warning: ‘void operator delete [](void*, std::size_t)’ is a usual (non-placement) deallocation function in C++14 (or with -fsized-deallocation) [-Wc++14-compat])
re PR tree-optimization/64718 (Bad 16-bit bswap replacement)
2015-01-28 Thomas Preud'homme <thomas.preudhomme@arm.com>
gcc/
PR tree-optimization/64718
* tree-ssa-math-opts.c (pass_optimize_bswap::execute): Make bswap_type
be a 16bit unsigned integer when n->range is 16.
(bswap_replace): Convert src to that type if necessary for all bswap
sizes. Fix rotation right notation in nearby comment. Use bswap_type
set in pass_optimize_bswap::execute ().
gcc/testsuite/
PR tree-optimization/64718
* gcc.c-torture/execute/pr64718.c: New test.
David Malcolm [Tue, 27 Jan 2015 20:19:36 +0000 (20:19 +0000)]
toplev: gcc version information for jit
gcc/ChangeLog:
* toplev.c (print_version): Add param "show_global_state", and
only print GGC and plugin information if it is true.
(init_asm_output): Pass in "true" for the new param when calling
print_version.
(process_options): Likewise.
(toplev::main): Likewise.
* toplev.h (print_version): Add new param to decl.
gcc/jit/ChangeLog:
* docs/internals/test-hello-world.exe.log.txt: Add example version
lines.
* jit-common.h (gcc::jit::dump::get_file): New accessor.
* jit-logging.c: Include toplev.h.
(gcc::jit::logger::logger): Log the GCC version.
* jit-recording.c: Include toplev.h.
(gcc:jit::recording::context::dump_reproducer_to_file): Log the
GCC version.
Dominik Vogt [Tue, 27 Jan 2015 15:26:16 +0000 (15:26 +0000)]
extend.texi: s/390: Update documentation of hotpatch attribute.
2015-01-27 Dominik Vogt <vogt@linux.vnet.ibm.com>
* doc/extend.texi: s/390: Update documentation of hotpatch attribute.
* doc/invoke.texi (-mhotpatch): s/390: Update documentation of
-mhotpatch= option.
* config/s390/s390.opt (mhotpatch): s/390: Remove -mhotpatch and
-mno-hotpatch options. Change syntax of -mhotpatch= option.
* config/s390/s390.c (s390_hotpatch_trampoline_halfwords_default):
Renamed.
(s390_hotpatch_trampoline_halfwords_max): Renamed.
(s390_hotpatch_hw_max): New name.
(s390_hotpatch_trampoline_halfwords): Renamed.
(s390_hotpatch_hw_before_label): New name.
(get_hotpatch_attribute): Removed.
(s390_hotpatch_hw_after_label): New name.
(s390_handle_hotpatch_attribute): Add second parameter to hotpatch
attribute.
(s390_attribute_table): Ditto.
(s390_function_num_hotpatch_trampoline_halfwords): Renamed.
(s390_function_num_hotpatch_hw): New name.
Remove special handling of inline functions and hotpatching.
Return number of nops before and after the function label.
(s390_can_inline_p): Removed.
(s390_asm_output_function_label): Emit a configurable number of nops
after the function label.
(s390_option_override): Update -mhotpatch= syntax and remove -mhotpatch.
(TARGET_CAN_INLINE_P) Removed.
(TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P): New.
2015-01-27 Dominik Vogt <vogt@linux.vnet.ibm.com>
* gcc/testsuite/gcc.target/s390/hotpatch-13.c: New testcase.
* gcc/testsuite/gcc.target/s390/hotpatch-14.c: New testcase.
* gcc/testsuite/gcc.target/s390/hotpatch-15.c: New testcase.
* gcc/testsuite/gcc.target/s390/hotpatch-16.c: New testcase.
* gcc/testsuite/gcc.target/s390/hotpatch-17.c: New testcase.
* gcc/testsuite/gcc.target/s390/hotpatch-18.c: New testcase.
* gcc/testsuite/gcc.target/s390/hotpatch-19.c: New testcase.
* gcc/testsuite/gcc.target/s390/hotpatch-20.c: New testcase.
* gcc/testsuite/gcc.target/s390/hotpatch-compile-10.c: New testcase.
* gcc/testsuite/gcc.target/s390/hotpatch-compile-11.c: New testcase.
* gcc/testsuite/gcc.target/s390/hotpatch-compile-12.c: New testcase.
* gcc/testsuite/gcc.target/s390/hotpatch-compile-13.c: New testcase.
* gcc/testsuite/gcc.target/s390/hotpatch-compile-14.c: New testcase.
* gcc/testsuite/gcc.target/s390/hotpatch-compile-15.c: New testcase.
* gcc/testsuite/gcc.target/s390/hotpatch-compile-16.c: New testcase.
* gcc/testsuite/gcc.target/s390/hotpatch-compile-9.c: New
testcase.
* gcc/testsuite/gcc.target/s390/hotpatch-1.c: Testcase adjusted to
new -mhotpatch.
* gcc/testsuite/gcc.target/s390/hotpatch-10.c: Likewise.
* gcc/testsuite/gcc.target/s390/hotpatch-11.c: Likewise.
* gcc/testsuite/gcc.target/s390/hotpatch-12.c: Likewise.
* gcc/testsuite/gcc.target/s390/hotpatch-2.c: Likewise.
* gcc/testsuite/gcc.target/s390/hotpatch-3.c: Likewise.
* gcc/testsuite/gcc.target/s390/hotpatch-4.c: Likewise.
* gcc/testsuite/gcc.target/s390/hotpatch-5.c: Likewise.
* gcc/testsuite/gcc.target/s390/hotpatch-6.c: Likewise.
* gcc/testsuite/gcc.target/s390/hotpatch-7.c: Likewise.
* gcc/testsuite/gcc.target/s390/hotpatch-8.c: Likewise.
* gcc/testsuite/gcc.target/s390/hotpatch-9.c: Likewise.
* gcc/testsuite/gcc.target/s390/hotpatch-compile-1.c: Likewise.
* gcc/testsuite/gcc.target/s390/hotpatch-compile-2.c: Likewise.
* gcc/testsuite/gcc.target/s390/hotpatch-compile-3.c: Likewise.
* gcc/testsuite/gcc.target/s390/hotpatch-compile-4.c: Likewise.
* gcc/testsuite/gcc.target/s390/hotpatch-compile-5.c: Likewise.
* gcc/testsuite/gcc.target/s390/hotpatch-compile-6.c: Likewise.
* gcc/testsuite/gcc.target/s390/hotpatch-compile-7.c: Likewise.
* gcc/testsuite/gcc.target/s390/hotpatch-compile-8.c: Likewise.
Nick Clifton [Tue, 27 Jan 2015 11:37:08 +0000 (11:37 +0000)]
rl78.c (rl78_expand_prologue): In G10 mode push the BC, DE and HL registers directly, not via AX.
* config/rl78/rl78.c (rl78_expand_prologue): In G10 mode push the
BC, DE and HL registers directly, not via AX.
When decrementing the stack pointer by a large amount, transfer SP
into AX and perform the subtraction there.
(rl78_expand_epilogue): Perform the inverse of the above
enhancements.
Nick Clifton [Tue, 27 Jan 2015 11:36:01 +0000 (11:36 +0000)]
cmpsi2.S: Use function start and end macros.
* config/rl78/cmpsi2.S: Use function start and end macros.
(__gcc_bcmp): New function.
* config/rl78/lshrsi3.S: Use function start and end macros.
* config/rl78/mulsi3.S: Add support for G10.
(__mulqi3): New function for G10.
* config/rl78/signbit.S: Use function start and end macros.
* config/rl78/t-rl78 (LIB2ADD): Add bit-count.S, fpbit-sf.S and
fpmath-sf.S.
(LIB2FUNCS_EXCLUDE): Define.
(LIB2FUNCS_ST): Define.
* config/rl78/trampoline.S: Use function start and end macros.
* config/rl78/vregs.h (START_FUNC): New macro.
(START_ANOTHER_FUNC): New macro.
(END_FUNC): New macro.
(END_ANOTHER_FUNC): New macro.
* config/rl78/bit-count.S: New file. Contains assembler
implementations of the bit counting functions: ___clzhi2,
__clzsi2, ctzhi2, ctzsi2, ffshi2, ffssi2, __partityhi2,
__paritysi2, __popcounthi2 and __popcountsi2.
* config/rl78/fpbit-sf.S: New file. Contains assembler
implementationas of the math functions: __negsf2, __cmpsf2,
__eqsf2, __nesf2, __lesf2, __ltsf2, __gesf2, gtsf2, __unordsf2,
__fixsfsi, __fixunssfsi, __floatsisf and __floatunssisf.
* config/rl78/fpmath-sf.S: New file. Contains assembler
implementations of the math functions: __subsf3, __addsf3,
__mulsf3 and __divsf3
Richard Biener [Tue, 27 Jan 2015 09:49:29 +0000 (09:49 +0000)]
re PR tree-optimization/56273 (Bogus -Warray-bounds warning)
2015-01-27 Richard Biener <rguenther@suse.de>
PR tree-optimization/56273
PR tree-optimization/59124
PR tree-optimization/64277
* tree-vrp.c (vrp_finalize): Emit array-bound warnings only
from the first VRP pass.
* g++.dg/warn/Warray-bounds-6.C: New testcase.
* gcc.dg/Warray-bounds-12.c: Likewise.
* gcc.dg/Warray-bounds-13.c: Likewise.
Jakub Jelinek [Tue, 27 Jan 2015 09:19:30 +0000 (10:19 +0100)]
re PR rtl-optimization/61058 (ICE: RTL check: expected elt 3 type 'B', have '0' (rtx barrier) in distance_agu_use_in_bb, at config/i386/i386.c:16740 with __builtin_unreachable())
PR rtl-optimization/61058
* jump.c (cleanup_barriers): Update basic block boundaries
if BLOCK_FOR_INSN is non-NULL on PREV.
David Malcolm [Tue, 27 Jan 2015 00:17:56 +0000 (00:17 +0000)]
update_web_docs_svn: support the JIT documentation
maintainer-scripts/ChangeLog:
* update_web_docs_svn: Don't delete gcc/jit/docs or
gcc/jit/jit-common.h, gcc/jit/notes.txt. Special case the
building of the JIT docs (using sphinx-build). Special case
copying them up.
David Malcolm [Tue, 27 Jan 2015 00:11:21 +0000 (00:11 +0000)]
Fix gcc_jit_context_get_last_error docs
gcc/jit/ChangeLog:
* docs/topics/compilation.rst (gcc_jit_result_get_code): Fix typo.
* docs/topics/contexts.rst (gcc_jit_context_get_last_error): The
error buffer is only valid until the next call to the context.
* libgccjit.h (gcc_jit_context_get_first_error): Reword the
comment to omit mention of compiling.
(gcc_jit_context_get_last_error): The error buffer is only valid
until the next call to the context.
Oleg Endo [Mon, 26 Jan 2015 23:56:05 +0000 (23:56 +0000)]
re PR target/49263 (SH Target: underutilized "TST #imm, R0" instruction)
gcc/
PR target/49263
* config/sh/sh.c (sh_split_treg_set_expr): Invoke emit_insn before
remove_insn.
* config/sh/sh.md (tstsi_t): Don't try to optimize constant with right
shifts if it already fits into K08.
Jonathan Wakely [Mon, 26 Jan 2015 23:42:39 +0000 (23:42 +0000)]
re PR target/64368 (Several libstdc++ test failures on non-linux platforms after r218964.)
PR libstdc++/64368
* config/locale/gnu/numeric_members.cc (numpunct<char>::~numpunct(),
numpunct<wchar_t>::~numpunct()): Do not set _M_data->_M_grouping.
* src/c++11/cxx11-shim_facets.cc (numpunct_shim): Remove _M_grouping
and use cache's _M_grouping field.
(__numpunct_fill_cache): Likewise.
(__moneypunct_fill_cache): Improve comments.
Paul Thomas [Mon, 26 Jan 2015 21:58:42 +0000 (21:58 +0000)]
re PR fortran/62044 (ICE in USE statement with RENAME for extended derived type)
2015-01-26 Paul Thomas <pault@gcc.gnu.org>
PR fortran/62044
* resolve.c (resolve_allocate_expr): If the default initializer
is NULL, keep the original MOLD expression so that the correct
typespec is available.
2015-01-26 Paul Thomas <pault@gcc.gnu.org>
PR fortran/62044
* gfortran.dg/allocate_with_mold_1.f90: New test
Jakub Jelinek [Mon, 26 Jan 2015 21:32:09 +0000 (22:32 +0100)]
re PR c/64778 (ICE on invalid code on x86_64-linux-gnu: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in create_tmp_from_val, at gimplify.c:491)
PR c/64778
* c-typeck.c (convert_arguments): Return -1 if there are
error_args, even if we've diagnosed too many arguments.
Janus Weil [Mon, 26 Jan 2015 15:56:03 +0000 (16:56 +0100)]
re PR fortran/64230 (Invalid memory reference in a compiler-generated finalizer for allocatable component)
2015-01-26 Janus Weil <janus@gcc.gnu.org>
PR fortran/64230
* class.c (finalize_component): New argument 'sub_ns'. Insert code to
check if 'expr' is associated.
(generate_finalization_wrapper): Rename 'ptr' symbols to 'ptr1' and
'ptr2'. Pass 'sub_ns' to finalize_component.
* gcc.target/aarch64/advsimd-intrinsics/vpXXX.inc: New file.
* gcc.target/aarch64/advsimd-intrinsics/vpadd.c: New file.
* gcc.target/aarch64/advsimd-intrinsics/vpmax.c: New file.
* gcc.target/aarch64/advsimd-intrinsics/vpmin.c: New file.
* gcc.target/aarch64/advsimd-intrinsics/vmlX_n.inc: New file.
* gcc.target/aarch64/advsimd-intrinsics/vmla_n.c: New file.
* gcc.target/aarch64/advsimd-intrinsics/vmls_n.c: New file.
* gcc.target/aarch64/advsimd-intrinsics/vXXXhn.inc: New file.
* gcc.target/aarch64/advsimd-intrinsics/vraddhn.c: New file.
* gcc.target/aarch64/advsimd-intrinsics/vrsubhn.c: New file.
* gcc.target/aarch64/advsimd-intrinsics/vsubhn.c: New file.
* gcc.target/aarch64/advsimd-intrinsics/vaddhn.c: Use code from
vXXXhn.inc.
James Greenhalgh [Mon, 26 Jan 2015 09:17:25 +0000 (09:17 +0000)]
[ARM] Wire up the new scheduler description for the ARM Cortex-A57 processor
* config/arm/arm-cores.def (cortex-a57): Use the new Cortex-A57
pipeline model.
config/arm/arm.md: Include the new Cortex-A57 model.
(generic_sched): Don't use generic_sched when tuning for
Cortex-A57.
Mikael Morin [Sun, 25 Jan 2015 20:30:53 +0000 (20:30 +0000)]
re PR fortran/62044 (ICE in USE statement with RENAME for extended derived type)
fortran/
PR fortran/62044
* decl.c (gfc_match_derived_decl): Don't insert a new symtree element.
* module.c (MOD_VERSION): Bump.
(write_module): Don't write list of extensions.
(read_module): Don't jump over list of extensions;
don't load list of extensions.
(load_derived_extensions, write_dt_extensions,
write_derived_extensions): Remove.
Oleg Endo [Sun, 25 Jan 2015 16:54:33 +0000 (16:54 +0000)]
re PR libstdc++/29366 (atomics config for sh is weird)
libstdc++-v3/
PR target/29366
* config/cpu/sh/atomicity.h (__exchange_and_add, __atomic_add):
Remove SH4A inline asm and lock based implementations and use the
defaults from ext/atomicity.h.
* config/i386/cpuinfo.c (processor_subtypes): Add
INTEL_COREI7_BROADWELL.
(get_intel_cpu): Support new Silvermont, Haswell and Broadwell
model numbers.
Oleg Endo [Sat, 24 Jan 2015 13:04:53 +0000 (13:04 +0000)]
re PR target/49263 (SH Target: underutilized "TST #imm, R0" instruction)
gcc/
PR target/49263
PR target/53987
PR target/64345
PR target/59533
PR target/52933
PR target/54236
PR target/51244
* config/sh/sh-protos.h
(sh_extending_set_of_reg::can_use_as_unextended_reg,
sh_extending_set_of_reg::use_as_unextended_reg,
sh_is_nott_insn, sh_movt_set_dest, sh_movrt_set_dest, sh_is_movt_insn,
sh_is_movrt_insn, sh_insn_operands_modified_between_p,
sh_reg_dead_or_unused_after_insn, sh_in_recog_treg_set_expr,
sh_recog_treg_set_expr, sh_split_treg_set_expr): New functions.
(sh_treg_insns): New class.
* config/sh/sh.c (TARGET_LEGITIMATE_COMBINED_INSN): Define target hook.
(scope_counter): New class.
(sh_legitimate_combined_insn, sh_is_nott_insn, sh_movt_set_dest,
sh_movrt_set_dest, sh_reg_dead_or_unused_after_insn,
sh_extending_set_of_reg::can_use_as_unextended_reg,
sh_extending_set_of_reg::use_as_unextended_reg, sh_recog_treg_set_expr,
sh_in_recog_treg_set_expr, sh_try_split_insn_simple,
sh_split_treg_set_expr): New functions.
(addsubcosts): Handle treg_set_expr.
(sh_rtx_costs): Handle IF_THEN_ELSE and ZERO_EXTRACT.
(sh_rtx_costs): Use arith_reg_operand in SIGN_EXTEND and ZERO_EXTEND.
(sh_rtx_costs): Handle additional bit test patterns in EQ and AND cases.
(sh_insn_operands_modified_between_p): Make non-static.
* config/sh/predicates.md (zero_extend_movu_operand): Allow
simple_mem_operand in addition to displacement_mem_operand.
(zero_extend_operand): Don't allow zero_extend_movu_operand.
(treg_set_expr, treg_set_expr_not_const01,
arith_reg_or_treg_set_expr): New predicates.
* config/sh/sh.md (tstsi_t): Use arith_reg_operand and
arith_or_int_operand instead of logical_operand. Convert to
insn_and_split. Try to optimize constant operand in splitter.
(tsthi_t, tstqi_t): Fold into *tst<mode>_t. Convert to insn_and_split.
(*tstqi_t_zero): Delete.
(*tst<mode>_t_subregs): Add !sh_in_recog_treg_set_expr split condition.
(tstsi_t_and_not): Delete.
(tst<mode>_t_zero_extract_eq): Rename to *tst<mode>_t_zero_extract.
Convert to insn_and_split.
(unnamed split, tstsi_t_zero_extract_xor,
tstsi_t_zero_extract_subreg_xor_little,
tstsi_t_zero_extract_subreg_xor_big): Delete.
(*tstsi_t_shift_mask): New insn_and_split.
(cmpeqsi_t, cmpgesi_t): Add new split for const_int 0 operands and try
to recombine with surrounding insns when splitting.
(*negtstsi): Add !sh_in_recog_treg_set_expr condition.
(cmp_div0s_0, cmp_div0s_1, *cmp_div0s_0, *cmp_div0s_1): Rewrite as ...
(cmp_div0s, *cmp_div0s_1, *cmp_div0s_2, *cmp_div0s_3, *cmp_div0s_4,
*cmp_div0s_5, *cmp_div0s_6): ... these new insn_and_split patterns.
(*cbranch_div0s: Delete.
(*addc): Convert to insn_and_split. Use treg_set_expr as 3rd operand.
Try to recombine with surrounding insns when splitting. Add operand
order variants.
(*addc_t_r, *addc_r_t): Use treg_set_expr_not_const01.
(*addc_r_r_1, *addc_r_lsb, *addc_r_r_lsb, *addc_r_lsb_r, *addc_r_msb,
*addc_r_r_msb, *addc_2r_msb): Delete.
(*addc_2r_lsb): Rename to *addc_2r_t. Use treg_set_expr. Add operand
order variant.
(*addc_negreg_t): New insn_and_split.
(*subc): Convert to insn_and_split. Use treg_set_expr as 3rd operand.
Try to recombine with surrounding insns when splitting.
Add operand order variants.
(*subc_negt_reg, *subc_negreg_t, *reg_lsb_t, *reg_msb_t): New
insn_and_split patterns.
(*rotcr): Use arith_reg_or_treg_set_expr. Try to recombine with
surrounding insns when splitting.
(unnamed rotcr split): Use arith_reg_or_treg_set_expr.
(*rotcl): Likewise. Add zero_extract variant.
(*ashrsi2_31): New insn_and_split.
(*negc): Convert to insn_and_split. Use treg_set_expr.
(*zero_extend<mode>si2_disp_mem): Update comment.
(movrt_negc, *movrt_negc, nott): Add !sh_in_recog_treg_set_expr split
condition.
(*mov_t_msb_neg, mov_neg_si_t): Use treg_set_expr. Try to recombine
with surrounding insns when splitting.
(any_treg_expr_to_reg): New insn_and_split.
(*neg_zero_extract_0, *neg_zero_extract_1, *neg_zero_extract_2,
*neg_zero_extract_3, *neg_zero_extract_4, *neg_zero_extract_5,
*neg_zero_extract_6, *zero_extract_0, *zero_extract_1,
*zero_extract_2): New single bit zero extract patterns.
(bld_reg, *bld_regqi): Fold into bld<mode>_reg.
(*get_thread_pointersi, store_gbr, *mov<mode>_gbr_load,
*mov<mode>_gbr_load, *mov<mode>_gbr_load, *mov<mode>_gbr_load,
*movdi_gbr_load): Use arith_reg_dest instead of register_operand for
set destination.
(set_thread_pointersi, load_gbr): Use arith_reg_operand instead of
register_operand for set source.