2016-03-31 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/70461
* ira-color.c (allocno_copy_cost_saving): Use allocno class if it
is necessary.
From-SVN: r234649
Fix PR hsa/70399
PR hsa/70399
* hsa-brig.c (hsa_op_immed::emit_to_buffer): Emit either
a tree value or an immediate integer value to a buffer
that is eventually copied to a BRIG section.
(emit_immediate_operand): Call the function here.
* hsa-dump.c (dump_hsa_immed): Remove checking assert.
* hsa-gen.c (hsa_op_immed::hsa_op_immed): Remove initialization
of class' fields that are removed.
(hsa_op_immed::~hsa_op_immed): Remove deinitialization.
* hsa.h (class hsa_op_immed): Remove m_brig_repr and
m_brig_repr_size fields.
From-SVN: r234647
PR hsa/70391
* hsa-gen.c (hsa_function_representation::update_dominance): New
function.
(convert_addr_to_flat_segment): Likewise.
(gen_hsa_memory_set): New alignment argument.
(gen_hsa_ctor_assignment): Likewise.
(gen_hsa_insns_for_single_assignment): Provide alignment
to gen_hsa_ctor_assignment.
(gen_hsa_insns_for_direct_call): Add new argument.
(expand_lhs_of_string_op): New function.
(expand_string_operation_builtin): Likewise.
(expand_memory_copy): New function.
(expand_memory_set): New function.
(gen_hsa_insns_for_call): Use HOST_WIDE_INT.
(convert_switch_statements): Change signature.
(generate_hsa): Use a return value of the function.
(pass_gen_hsail::execute): Do not call
convert_switch_statements here.
* hsa-regalloc.c (hsa_regalloc): Call update_dominance.
* hsa.h (hsa_function_representation::m_modified_cfg):
New flag.
(hsa_function_representation::update_dominance): New function.
From-SVN: r234644
PR hsa/70391
* hsa-brig.c (emit_directive_variable): Emit alignment
according to hsa_symbol::m_align.
* hsa-dump.c (hsa_byte_alignment): Move the function to
another file.
(dump_hsa_symbol): Dump alignment of HSA symbols.
* hsa-gen.c (get_symbol_for_decl): Set-up alignment
of a symbol.
(gen_hsa_addr_with_align): New function.
(hsa_bitmemref_alignment): Use newly added function.
(gen_hsa_insns_for_load): Likewise.
(gen_hsa_insns_for_store): Likewise.
(gen_hsa_memory_copy): New argument added.
(gen_hsa_insns_for_single_assignment): Respect
alignment for assignments processed via
gen_hsa_memory_copy.
(gen_hsa_insns_for_direct_call): Likewise.
(gen_hsa_insns_for_return): Likewise.
(gen_function_def_parameters): Set default
alignment.
* hsa.c (hsa_object_alignment): New function.
(hsa_byte_alignment): Pasted function.
* hsa.h (hsa_symbol::m_align): New field.
From-SVN: r234643
PR c/70297
* c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
* decl.c (duplicate_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
* c-c++-common/pr70297.c: New test.
* g++.dg/cpp0x/typedef-redecl.C: New test.
* gcc.dg/typedef-redecl2.c: New test.
From-SVN: r234626
PR rtl-optimization/70460
* ira.c (indirect_jump_optimize): Don't substitute LABEL_REF
with operand from REG_LABEL_OPERAND, instead substitute
SET_SRC or REG_EQUAL note content if it is a LABEL_REF.
Don't do anything for REG_NON_LOCAL_GOTO jumps.
* gcc.c-torture/execute/pr70460.c: New test.
From-SVN: r234614
* tree-ssa-loop-ivopts.c (struct comp_cost): New scrach field.
(no_cost, infinite_cost): Initialize the new field.
(get_computation_cost_at): Record setup cost.
(determine_use_iv_cost_address): Skip cost computation for sub
uses if we can estimate it without losing accuracy.
From-SVN: r234612
2016-03-31 Richard Biener <rguenther@suse.de>
PR c++/70430
* typeck.c (cp_build_binary_op): Fix operand order of vector
conditional in truth op handling.
* g++.dg/ext/vector30.C: New testcase.
From-SVN: r234611
2016-03-30 Jerry DeLisle <jvdelisle@gcc.gnu.org>
Dominique d'Humieres <dominiq@lps.ens.fr>
PR libgfortran/70235
* io/write_float.def: Fix PF format for negative values of the scale
factor.
2016-03-30 Dominique d'Humieres <dominiq@lps.ens.fr>
Jerry DeLisle <jvdelisle@gcc.gnu.org>
* gfortran.dg/fmt_pf.f90: New test.
From-SVN: r234600
PR target/70421
* config/i386/i386.c (ix86_expand_vector_set): Fix up argument order
in gen_blendm expander.
* gcc.dg/torture/pr70421.c: New test.
* gcc.target/i386/avx512f-pr70421.c: New test.
From-SVN: r234569
PR target/62254
* config/arm/arm.c (arm_reload_out_hi): Add code to handle the
case where we are already provided with an SImode SUBREG.
From-SVN: r234568
Since %ecx can't be used for both DRAP register and __builtin_eh_return,
we need to check if crtl->drap_reg uses %ecx before using %ecx for
__builtin_eh_return.
PR target/70439
* config/i386/i386.c (ix86_expand_epilogue): Properly check
conflict between DRAP register and __builtin_eh_return.
From-SVN: r234559
2016-03-30 Michael Matz <matz@suse.de>
Richard Biener <rguenther@suse.de>
PR ipa/12392
* ipa-polymorphic-call.c (struct type_change_info): Change
speculative to an unsigned allowing to limit the work we do.
(csftc_abort_walking_p): New inline function..
(check_stmt_for_type_change): Limit the number of may-defs
skipped for speculative devirtualization to
max-speculative-devirt-maydefs.
* params.def (max-speculative-devirt-maydefs): New param.
* doc/invoke.texi (--param max-speculative-devirt-maydefs): Document.
Co-Authored-By: Richard Biener <rguenther@suse.de>
From-SVN: r234546
PR target/63890
* config/i386/i386.h (ACCUMULATE_OUTGOING_ARGS): Use when profiling
and TARGET_MACHO.
* tree-vrp.c (register_edge_assert_for_2): For NAME != CST1
From-SVN: r234545
gcc/ChangeLog:
PR tree-optimization/59124
* tree-vrp.c (register_edge_assert_for_2): For NAME != CST1
where NAME = A +- CST2 add the assertion A != (CST1 -+ CST2).
gcc/testsuite/ChangeLog:
PR tree-optimization/59124
* gcc.dg/Warray-bounds-19.c: New test.
From-SVN: r234544
gcc/fortran/ChangeLog:
2016-03-29 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/70397
* trans-expr.c (gfc_class_len_or_zero_get): Add function to return a
constant zero tree, when the class to get the _len component from is
not unlimited polymorphic.
(gfc_copy_class_to_class): Use the new function.
* trans.h: Added interface of new function gfc_class_len_or_zero_get.
gcc/testsuite/ChangeLog:
2016-03-29 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/70397
* gfortran.dg/unlimited_polymorphic_25.f90: New test.
* gfortran.dg/unlimited_polymorphic_26.f90: New test.
From-SVN: r234528
2016-03-29 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/68695
* ira-color.c (allocno_copy_cost_saving): New.
(improve_allocation): Use it.
From-SVN: r234527