re PR target/65710 (Thumb1 ICE caused by no register to spill)
2015-04-09 Vladimir Makarov <vmakarov@redhat.com>
PR target/65710
* lra-int.h (lra_bad_spill_regno_start): New.
* lra.c (lra_bad_spill_regno_start): New.
(lra): Set up lra_bad_spill_regno_start. Set up
lra_constraint_new_regno_start unconditionally.
* lra-assigns.c (spill_for): Use lra_bad_spill_regno_start for
spill preferences.
Richard Biener [Tue, 7 Apr 2015 13:40:24 +0000 (13:40 +0000)]
backport: re PR tree-optimization/64909 (Missed vectorization with bdver1)
2015-04-07 Richard Biener <rguenther@suse.de>
Backport from mainline
2015-04-04 Richard Biener <rguenther@suse.de>
PR tree-optimization/64909
PR tree-optimization/65660
* tree-vectorizer.h (vect_get_known_peeling_cost): Adjust
to take a cost vector for scalar iteration cost.
(vect_get_single_scalar_iteration_cost): Likewise.
* tree-vect-loop.c (vect_get_single_scalar_iteration_cost):
Compute the scalar iteration cost into a cost vector.
(vect_get_known_peeling_cost): Use the scalar cost vector to
account for the cost of the peeled iterations.
(vect_estimate_min_profitable_iters): Likewise.
* tree-vect-data-refs.c (vect_peeling_hash_get_lowest_cost):
Likewise.
Dominik Vogt [Tue, 31 Mar 2015 12:04:23 +0000 (12:04 +0000)]
S/390: Hotpatch: Remove special handling of nested functions.
Backport from mainline
gcc/
2015-03-31 Dominik Vogt <vogt@linux.vnet.ibm.com>
* config/s390/s390.c (s390_function_num_hotpatch_hw): Allow hotpatching
nested functions.
(s390_reorg): Adapt to new signature of s390_function_num_hotpatch_hw.
(s390_asm_output_function_label): Adapt to new signature of
s390_function_num_hotpatch_hw
Optimise the code generating assembler output.
Add comments to assembler file.
Jerry DeLisle [Sat, 28 Mar 2015 14:08:18 +0000 (14:08 +0000)]
re PR fortran/65596 (NAMELIST bug with f2003: reads too far)
2015-03-28 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/65596
* io/transfer.c (data_transfer_init): If in namelist mode and
delimiter is not specified, set it to DELIM_QUOTE, independent
of -std.
Vladimir Makarov [Fri, 27 Mar 2015 19:23:15 +0000 (19:23 +0000)]
backport: re PR rtl-optimization/64688 (internal compiler error: Max. number of generated reload insns per insn is achieved (90))
2015-03-27 Vladimir Makarov <vmakarov@redhat.com>
Backport from mainline
2015-01-30 Vladimir Makarov <vmakarov@redhat.com>
PR target/64688
* lra-constraints.c (original_subreg_reg_mode): New.
(simplify_operand_subreg): Try to simplify subreg of const. Use
original_subreg_reg_mode for it.
(swap_operands): Update original_subreg_reg_mode.
(curr_insn_transform): Set up original_subreg_reg_mode.
2015-03-27 Vladimir Makarov <vmakarov@redhat.com>
Backport from mainline
2015-01-30 Vladimir Makarov <vmakarov@redhat.com>
Bill Schmidt [Thu, 26 Mar 2015 12:03:36 +0000 (12:03 +0000)]
backport: rs6000.c (context.h): New #include.
gcc:
2015-03-26 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Backport of r214242, r214254, and bug fix patches from mainline
* config/rs6000/rs6000.c (context.h): New #include.
(tree-pass.h): Likewise.
(make_pass_analyze_swaps): New declaration.
(rs6000_option_override): Register swap-optimization pass.
(swap_web_entry): New class.
(special_handling_values): New enum.
(union_defs): New function.
(union_uses): Likewise.
(insn_is_load_p): Likewise.
(insn_is_store_p): Likewise.
(insn_is_swap_p): Likewise.
(rtx_is_swappable_p): Likewise.
(insn_is_swappable_p): Likewise.
(chain_purpose): New enum.
(chain_contains_only_swaps): New function.
(mark_swaps_for_removal): Likewise.
(swap_const_vector_halves): Likewise.
(adjust_subreg_index): Likewise.
(permute_load): Likewise.
(permute_store): Likewise.
(adjust_extract): Likewise.
(adjust_splat): Likewise.
(handle_special_swappables): Likewise.
(replace_swap_with_copy): Likewise.
(dump_swap_insn_table): Likewise.
(rs6000_analyze_swaps): Likewise.
(pass_data_analyze_swaps): New pass_data.
(pass_analyze_swaps): New class.
(pass_analyze_swaps::gate): New method.
(pass_analyze_swaps::execute): New method.
(make_pass_analyze_swaps): New function.
* config/rs6000/rs6000.opt (moptimize-swaps): New option.
* df.h (web_entry_base): New class, replacing struct web_entry.
(web_entry_base::pred): New method.
(web_entry_base::set_pred): Likewise.
(web_entry_base::unionfind_root): Likewise.
(web_entry_base::unionfind_union): Likewise.
(unionfind_root): Delete external reference.
(unionfind_union): Likewise.
(union_defs): Likewise.
* web.c (web_entry_base::unionfind_root): Convert to method.
(web_entry_base::unionfind_union): Likewise.
(web_entry): New class.
(union_match_dups): Convert to use class structure.
(union_defs): Likewise.
(entry_register): Likewise.
(web_main): Likewise.
[testsuite]
2015-03-26 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Backport r214254 and related tests from mainline
* gcc.target/powerpc/swaps-p8-1.c: New test.
* gcc.target/powerpc/swaps-p8-2.c: New test.
* gcc.target/powerpc/swaps-p8-3.c: New test.
* gcc.target/powerpc/swaps-p8-4.c: New test.
* gcc.target/powerpc/swaps-p8-5.c: New test.
* gcc.target/powerpc/swaps-p8-6.c: New test.
* gcc.target/powerpc/swaps-p8-7.c: New test.
* gcc.target/powerpc/swaps-p8-8.c: New test.
* gcc.target/powerpc/swaps-p8-9.c: New test.
* gcc.target/powerpc/swaps-p8-10.c: New test.
* gcc.target/powerpc/swaps-p8-11.c: New test.
* gcc.target/powerpc/swaps-p8-12.c: New test.
* gcc.target/powerpc/swaps-p8-13.c: New test.
* gcc.target/powerpc/swaps-p8-14.c: New test.
* gcc.target/powerpc/swaps-p8-15.c: New test.
* gcc.target/powerpc/swaps-p8-16.c: New test.
* gcc.target/powerpc/swaps-p8-17.c: New test.
Alan Modra [Thu, 26 Mar 2015 08:33:53 +0000 (19:03 +1030)]
re PR regression/63150 (FAIL: gcc.target/powerpc/pr53199.c scan-assembler-times *)
PR target/63150
Backport from trunk 211857 and 221445.
2014-06-20 Maciej W. Rozycki <macro@codesourcery.com>
* config/rs6000/rs6000.md: Append `DONE' to preparation
statements of `bswap' pattern splitters.
2015-03-16 Alan Modra <amodra@gmail.com>
* config/rs6000/rs6000.md (bswapdi2): Remove one scratch reg.
Modify Z->r bswapdi splitter to use dest in place of scratch.
In r->Z and Z->r bswapdi splitter rename word_high, word_low
to word1, word2 and rearrange logic to suit.
(bswapdi2_64bit): Remove early clobber on Z->r alternative.
(bswapdi2_ldbrx): Likewise. Remove '??' on r->r.
(bswapdi2_32bit): Remove early clobber on Z->r alternative.
Add one '?' on r->r. Modify Z->r splitter to avoid need for
early clobber.
Maxim Kuvyrkov [Tue, 24 Mar 2015 17:19:34 +0000 (17:19 +0000)]
Backport testsuite race fix from mainline
Backport from mainline:
2015-02-19 Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org>
PR testsuite/65116
* lib/target-supports.exp (check_compile): Check whether
additional_sources is defined before using it.
2015-02-19 Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org>
* lib/target-supports.exp (check_compile): Save/restore
additional_sources that may belong to an actual test.
backport: re PR fortran/60255 ([OOP] Deferred character length variable at (1) cannot yet be associated with unlimited polymorphic entities)
gcc/fortran/ChangeLog
2015-03-23 Andre Vehreschild <vehre@gmx.de>
Janus Weil <janus@gcc.gnu.org>
Backported from mainline
PR fortran/60255
Initial patch version: Janus Weil
* class.c (gfc_get_len_component): New.
(gfc_build_class_symbol): Add _len component to unlimited
polymorphic entities.
(find_intrinsic_vtab): Removed emitting of error message.
* gfortran.h: Added prototype for gfc_get_len_component.
* simplify.c (gfc_simplify_len): Use _len component where
available.
* trans-expr.c (gfc_class_len_get): New.
(gfc_conv_intrinsic_to_class): Add handling for deferred
character arrays.
(gfc_conv_structure): Treat _len component correctly.
(gfc_conv_expr): Prevent bind_c handling when not required.
(gfc_trans_pointer_assignment): Propagate _len component.
* trans-stmt.c (class_has_len_component): New.
(trans_associate_var): _len component treatement for associate
context.
(gfc_trans_allocate): Same as for trans_associate_var()
* trans.h: Add prototype for gfc_class_len_get.
gcc/testsuite/ChangeLog
2015-03-20 Andre Vehreschild <vehre@gmx.de>
Backport from mainline
PR fortran/60255
* gfortran.dg/unlimited_polymorphic_2.f03: Removed error.
Converted from dos to unix line endings.
* gfortran.dg/unlimited_polymorphic_20.f03: New test.
Co-Authored-By: Janus Weil <janus@gcc.gnu.org>
From-SVN: r221591
Yvan Roux [Mon, 23 Mar 2015 09:50:33 +0000 (09:50 +0000)]
backport: re PR ipa/63587 (ICE : tree check: expected var_decl, have result_decl in add_local_variables, at tree-inline.c:4112)
gcc/
2015-03-23 Yvan Roux <yvan.roux@linaro.org>
Backport from trunk r216841.
2014-10-29 Martin Liska <mliska@suse.cz>
PR ipa/63587
* cgraphunit.c (cgraph_node::expand_thunk): Only VAR_DECLs are put to local
declarations.
* function.c (add_local_decl): Implementation moved from header file, assert
introduced for tree type.
* function.h: Likewise.
Jerry DeLisle [Mon, 23 Mar 2015 00:16:01 +0000 (00:16 +0000)]
re PR fortran/60956 (error reading (and writing) large text files in gfortran)
2015-03-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/60956
Backport from mainline
* io/fbuf.c (fbuf_flush_list): New function that only flushes
if current fbuf position exceeds a limit.
* io/fbuf.h: Declare the new function.
* io/io.h (enum unit_mode): Add two new modes.
* io/list_read.c (list_formatted_read_scalar): Call new function.
* io/write.c: Include fbuf.h. (list_formatted_write_scalar):
Call new function.
Paul Thomas [Thu, 19 Mar 2015 20:12:29 +0000 (20:12 +0000)]
re PR fortran/59198 (ICE on cyclically dependent polymorphic types)
2014-03-19 Paul Thomas <pault@gcc.gnu.org>
PR fortran/59198
* trans-types.c (gfc_get_derived_type): If an abstract derived
type with procedure pointer components has no other type of
component, return the backend_decl. Otherwise build the
components if any of the non-procedure pointer components have
no backend_decl.
2014-03-19 Paul Thomas <pault@gcc.gnu.org>
PR fortran/59198
* gfortran.dg/proc_ptr_comp_44.f90 : New test
* gfortran.dg/proc_ptr_comp_45.f90 : New test
Kyrylo Tkachov [Thu, 19 Mar 2015 09:58:42 +0000 (09:58 +0000)]
[simplify-rtx] PR 65235: Calculate element size correctly when simplifying (vec_select (vec_concat (const_int) (...)) [...])
Backport from mainline
2015-03-12 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
PR rtl-optimization/65235
* simplify-rtx.c (simplify_binary_operation_1, VEC_SELECT case):
When first element of vec_concat is const_int, calculate its size
using second element.
PR rtl-optimization/65235
* gcc.target/aarch64/pr65235_1.c: New test.
Mikael Morin [Thu, 12 Mar 2015 16:08:48 +0000 (16:08 +0000)]
re PR fortran/60898 (model compile error with gfortran 4.7 and gcc 4.9)
PR fortran/60898
fortran/
* resolve.c (resolve_symbol): Check that the symbol found by
name lookup really is the current symbol being resolved.
testsuite/
* gfortran.dg/entry_20.f90: New.
Paul Thomas [Tue, 10 Mar 2015 22:24:01 +0000 (22:24 +0000)]
re PR fortran/65024 ([OOP] unlimited polymorphic pointer structure not built when it should be)
2015-03-10 Paul Thomas <pault@gcc.gnu.org>
PR fortran/65024
* trans-expr.c (gfc_conv_component_ref): If the component
backend declaration is missing and the derived type symbol is
available in the reference, call gfc_build_derived_type.
2015-03-10 Paul Thomas <pault@gcc.gnu.org>
PR fortran/65024
* gfortran.dg/unlimited_polymorphic_23.f90: New test
Martin Sebor [Tue, 10 Mar 2015 21:06:41 +0000 (21:06 +0000)]
re PR testsuite/63175 (FAIL: gcc.dg/vect/costmodel/ppc/costmodel-bb-slp-9a.c scan-tree-dump-times slp2" basic block vectorized using SLP" 1)
2015-03-10 Martin Sebor <msebor@redhat.com>
PR testsuite/63175
* gcc.dg/vect/costmodel/ppc/costmodel-bb-slp-9a.c (main1): Move
checking of results into main to prevent it from getting optimized
away.
* gcc.dg/vect/costmodel/ppc/costmodel-bb-slp-9a-pr63175.c: New test.
Yvan Roux [Tue, 10 Mar 2015 19:20:30 +0000 (19:20 +0000)]
backport: re PR ipa/64896 (ICE in get_address_mode, at rtlanal.c:5442)
gcc/
2015-03-10 Yvan Roux <yvan.roux@linaro.org>
Backport from trunk r220489.
2015-02-06 Jakub Jelinek <jakub@redhat.com>
PR ipa/64896
* cgraphunit.c (cgraph_node::expand_thunk): If
restype is not is_gimple_reg_type nor the thunk_fndecl
returns aggregate_value_p, set restmp to a temporary variable
instead of resdecl.
Alan Modra [Mon, 9 Mar 2015 23:19:19 +0000 (09:49 +1030)]
re PR target/65286 (When building on powerpc64le-unknown-linux-gnu, --disable-multilib must be used)
PR target/65286
* config.gcc (powerpc*-*-linux*): Arrange for powerpc64le-linux
to be single-arch by default. Set cpu_is_64bit for powerpc64
given --with-cpu=native.
* config/rs6000/t-fprules: Do not set default MULTILIB vars.
* config/rs6000/t-linux (MULTIARCH_DIRNAME): Support powerpc64
and powerpc64le.
* config/rs6000/linux64.h (SUBSUBTARGET_OVERRIDE_OPTIONS): Test
rs6000_isa_flags rather than TARGET_64BIT.
2015-03-03 Michael Meissner <meissner@linux.vnet.ibm.com>
Backport from trunk
2015-03-03 Michael Meissner <meissner@linux.vnet.ibm.com>
PR 65138/target
* config/rs6000/rs6000-cpus.def (powerpc64le): Add new generic
processor type for 64-bit little endian PowerPC.
* config/rs6000/rs6000.c (rs6000_option_override_internal): If
-mdebug=reg, print TARGET_DEFAULT. Fix logic to use
TARGET_DEFAULT if there is no default cpu. Fix -mdebug=reg
printing built-in mask so it does not pass NULL pointers.
* config/rs6000/rs6000-tables.opt: Regenerate.
* doc/invoke.texi (IBM RS/6000 and PowerPC options): Document
-mcpu=powerpc64le.
Backport from trunk
2015-01-19 David Edelsohn <dje.gcc@gmail.com>
* config/rs6000/default64.h: Include rs6000-cpus.def.
(TARGET_DEFAULT) [LITTLE_ENDIAN]: Use ISA 2.7 (POWER8).
(TARGET_DEFAULT) [BIG_ENDIAN]: Use POWER4.
* config/rs6000/driver-rs6000.c (detect_processor_aix): Add POWER7
and POWER8.
* config/rs6000/linux64.h (PROCESSOR_DEFAULT64): Always default to
POWER8.
* config/rs6000/rs6000.c (rs6000_file_start): Emit .machine
pseudo-op to specify assembler dialect.
backport: re PR target/59593 ([arm big-endian] using "ldrh" access a immediate which stored in a memory by word)
2015-03-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
Backport from mainline
2014-11-27 Thomas Preud'homme <thomas.preudhomme@arm.com>
gcc/
PR target/59593
* config/arm/arm.c (dump_minipool): dispatch to consttable pattern
based on mode size.
* config/arm/arm.md (consttable_1): Make it TARGET_EITHER.
(consttable_2): Make it TARGET_EITHER and move HFmode handling from
consttable_4 to it.
(consttable_4): Move HFmode handling to consttable_2 pattern.
gcc/testsuite/
PR target/59593
* gcc.target/arm/constant-pool.c: New test.
re PR target/64331 (regcprop propagates registers noted as REG_DEAD)
gcc/
PR target/64331
* config/avr/avr.c (context.h, tree-pass.h): Include them.
(avr_pass_data_recompute_notes): New static variable.
(avr_pass_recompute_notes): New class.
(avr_register_passes): New static function.
(avr_option_override): Call it.
gcc/testsuite/
PR target/64331
* gcc.target/avr/torture/pr64331.c: New test.
backport: re PR target/64453 (Live high register not saved in function prolog on ARM with -Os)
2015-01-23 Thomas Preud'homme <thomas.preudhomme@arm.com>
Backport from mainline
2015-01-14 Thomas Preud'homme <thomas.preudhomme@arm.com>
gcc/
PR target/64453
* config/arm/arm.c (callee_saved_reg_p): Define.
(arm_compute_save_reg0_reg12_mask): Use callee_saved_reg_p to check if
register is callee saved instead of !call_used_regs[reg].
(thumb1_compute_save_reg_mask): Likewise.
Richard Biener [Fri, 27 Feb 2015 10:32:14 +0000 (10:32 +0000)]
re PR testsuite/63175 (FAIL: gcc.dg/vect/costmodel/ppc/costmodel-bb-slp-9a.c scan-tree-dump-times slp2" basic block vectorized using SLP" 1)
2015-02-27 Richard Biener <rguenther@suse.de>
PR middle-end/63175
* builtins.c (get_object_alignment_2): Make sure to re-apply
the ANDed mask after recursing to its operand gets us a new
misalignment bit position.