gcc/
* tree-vect-loop.c (vect_analyze_loop_operations): Skip virtual phi
in the tail of outer-loop.
gcc/testsuite/
* gcc.dg/vect/vect-outer-simd-3.c: New test.
From-SVN: r228601
gcc/
* tree-ssa-loop-unswitch.c: Include "gimple-iterator.h" and
"cfghooks.h", add prototypes for introduced new functions.
(tree_ssa_unswitch_loops): Use from innermost loop iterator, move all
checks on ability of loop unswitching to tree_unswitch_single_loop;
invoke tree_unswitch_single_loop or tree_unswitch_outer_loop depending
on innermost loop check.
(tree_unswitch_single_loop): Add all required checks on ability of
loop unswitching under zero recursive level guard.
(tree_unswitch_outer_loop): New function.
(find_loop_guard): Likewise.
(empty_bb_without_guard_p): Likewise.
(used_outside_loop_p): Likewise.
(get_vop_from_header): Likewise.
(hoist_guard): Likewise.
(check_exit_phi): Likewise.
gcc/testsuite/
* gcc.dg/loop-unswitch-2.c: New test.
* gcc.dg/loop-unswitch-3.c: Likewise.
* gcc.dg/loop-unswitch-4.c: Likewise.
From-SVN: r228599
* expr.c (store_expr_with_bounds): Handle aggregate moves from
BLKmode.
* gimple-expr.c (useless_type_conversion_p): Do not use TYPE_CANONICAL
to define gimple type system; compare aggregates only by size.
From-SVN: r228586
Clean up the function to build scop's basic blocks and the function
that gathers the conditions under which a basic block is executed. We remove
one traversal of the dominator tree.
This refactoring was triggered by the need of a vec<bb> of all the basic blocks
in a region. We will use that vector in a patch that removes the out-of-ssa
translation of scalar dependences: we will iterate through the basic blocks of a
region to record scalar dependences crossing bbs or going out of the region.
The patch passes bootstrap and regtest on x86_64-linux.
2015-10-06 Aditya Kumar <aditya.k7@samsung.com>
Sebastian Pop <s.pop@samsung.com>
* graphite-dependences.c (scop_get_dependences): Do not use SCOP_BBS.
* graphite-isl-ast-to-gimple.c (get_max_schedule_dimensions): Same.
(generate_isl_schedule): Same.
* graphite-optimize-isl.c (scop_get_domains): Same.
(apply_schedule_map_to_scop): Same.
* graphite-poly.c (print_iteration_domains): Same.
(remove_gbbs_in_scop): Same.
(new_scop): Same.
(free_scop): Same.
(print_scop): Same.
* graphite-poly.h (struct scop): Rename bbs to pbbs.
(SCOP_BBS): Remove.
* graphite-scop-detection.c (compare_bb_depths): Remove.
(graphite_sort_dominated_info): Remove.
(try_generate_gimple_bb): Move out of scop_detection.
(all_non_dominated_preds_marked_p): Remove.
(build_scop_bbs_1): Remove.
(build_scop_bbs): Remove.
(nb_pbbs_in_loops): Do not use SCOP_BBS.
(find_scop_parameters): Same.
(sese_dom_walker): Rename gather_bbs.
(before_dom_children): Call try_generate_gimple_bb and collect gbb
and pbb.
(build_scops): Call gather_bbs.
* graphite-sese-to-poly.c (build_scop_scattering): Do not use SCOP_BBS.
(add_conditions_to_constraints): Same.
(build_scop_iteration_domain): Same.
(build_scop_drs): Same.
(new_pbb_from_pbb): Same.
* sese.c (new_sese_info): Create bbs.
* sese.h (struct sese_info_t): Add bbs.
Co-Authored-By: Sebastian Pop <s.pop@samsung.com>
From-SVN: r228581
PR target/66697
* config/i386/i386.c (ix86_option_override_internal): Always use
8-byte minimum stack boundary in 64-bit mode.
(ix86_compute_frame_layout): Remove assert on INCOMING_STACK_BOUNDARY.
(ix86_emit_save_reg_using_mov): Support unaligned SSE store.
Add a REG_CFA_EXPRESSION note if needed.
(ix86_emit_restore_sse_regs_using_mov): Support unaligned SSE load.
(ix86_handle_force_align_arg_pointer_attribute): New.
(ix86_minimum_incoming_stack_boundary): Remove TARGET_64BIT check.
(ix86_attribute_table): Set ix86_force_align_arg_pointer_string
with ix86_handle_force_align_arg_pointer_attribute.
* config/i386/i386.h (MIN_STACK_BOUNDARY): Set to BITS_PER_WORD.
testsuite/ChangeLog:
PR target/66697
* gcc.target/i386/20060512-1.c: Remove ia32 requirement.
(PUSH, POP): New defines.
(sse2_test): Use PUSH and POP to misalign runtime stack.
* gcc.target/i386/20060512-2.c: Remove ia32 requirement.
From-SVN: r228577
PR go/67874
net, runtime: Call C library fcntl function rather than syscall.Syscall.
Not all systems define a fcntl syscall; some only have fcntl64.
Fixes GCC PR go/67874.
Reviewed-on: https://go-review.googlesource.com/15497
From-SVN: r228576
2015-10-06 Aditya Kumar <aditya.k7@samsung.com>
Sebastian Pop <s.pop@samsung.com>
* graphite-isl-ast-to-gimple.c (translate_isl_ast_to_gimple): Use
an sese_info_p.
(copy_def): Same.
(copy_internal_parameters): Same.
(translate_isl_ast_to_gimple): Use an sese_l.
(build_iv_mapping): Same.
* graphite-poly.c (new_sese): Rename new_sese_info.
(free_sese): Rename free_sese_info.
* graphite-poly.h (struct scop): Use an sese_info_p.
(scop_set_region): Same.
* graphite-scop-detection.c (struct sese_l): Moved...
(get_entry_bb): Moved...
(get_exit_bb): Moved...
(parameter_index_in_region_1): Use an sese_info_p.
(parameter_index_in_region): Same.
(scan_tree_for_params): Same.
(find_params_in_bb): Same.
(sese_dom_walker): Use an sese_l.
* graphite-sese-to-poly.c (remove_invariant_phi): Same.
(reduction_phi_p): Same.
(parameter_index_in_region_1): Use an sese_info_p.
(propagate_expr_outside_region): Use an sese_l.
* graphite.c: Replace uses of SCOP_REGION.
* sese.c (sese_record_loop): Use an sese_info_p.
(build_sese_loop_nests): Same.
(sese_build_liveouts_use): Same.
(sese_build_liveouts_bb): Same.
(sese_build_liveouts_bb): Same.
(sese_bad_liveouts_use): Same.
(sese_reset_debug_liveouts_bb): Same.
(sese_build_liveouts): Same.
(new_sese): Renamed new_sese_info.
(free_sese): Renamed free_sese_info.
(set_rename): Use an sese_info_p.
(graphite_copy_stmts_from_block): Same.
(copy_bb_and_scalar_dependences): Same.
(outermost_loop_in_sese_1): Use an sese_l.
(outermost_loop_in_sese): Same.
(if_region_set_false_region): Use an sese_info_p.
(move_sese_in_condition): Same.
(scalar_evolution_in_region): Use an sese_l.
* sese.h (struct sese_l): ... here.
(SESE_ENTRY): Remove.
(SESE_ENTRY_BB): Remove.
(SESE_EXIT): Remove.
(SESE_EXIT_BB): Remove.
(sese_contains_loop): Use an sese_info_p.
(sese_nb_params): Same.
(bb_in_sese_p): Use an sese_l.
(stmt_in_sese_p): Same.
(defined_in_sese_p): Same.
(loop_in_sese_p): Same.
(sese_loop_depth): Same.
(struct ifsese_s): Use an sese_info_p.
(gbb_loop_at_index): Use an sese_l.
(nb_common_loops): Same.
(scev_analyzable_p): Same.
Co-Authored-By: Sebastian Pop <s.pop@samsung.com>
From-SVN: r228572
Define x86 CALL_USED_REGISTERS_MASK used on x86 CALL_USED_REGISTERS.
* config/i386/i386.c (ix86_conditional_register_usage): Use
CALL_USED_REGISTERS_MASK.
* config/i386/i386.h (CALL_USED_REGISTERS_MASK): New macro.
From-SVN: r228568
gcc/fortran/ChangeLog:
2015-10-07 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/65889
* trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Handle pointer to and
on stack class objects as sizeof parameter.
gcc/testsuite/ChangeLog:
2015-10-07 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/65889
* gfortran.dg/sizeof_5.f90: New test.
From-SVN: r228566
ix86_maybe_switch_abi is called to late during RTL expansion and we
use the stale information from compilation of the previous function.
aggregate_value_p uses call_used_regs. aggregate_value_p is used by
IPA and return value optimization, which are called before
ix86_maybe_switch_abi is called. This patch merges ix86_maybe_switch_abi
with ix86_set_current_function.
PR target/67850
* config/i386/i386.c (ix86_maybe_switch_abi): Merged with ...
(ix86_set_current_function): This.
(TARGET_EXPAND_TO_RTL_HOOK): Removed.
From-SVN: r228565
2015-10-07 Richard Biener <rguenther@suse.de>
* tree-vectorizer.h (stmt_vec_info_vec): Use vec<stmt_vec_info>.
(vinfo_for_stmt): Adjust.
(set_vinfo_for_stmt): Likewise.
* tree-vectorizer.c (stmt_vec_info_vec): Likewise.
* tree-vect-stmts.c (free_stmt_vec_info_vec): Likewise.
* tree-vect-loop.c (new_loop_vec_info): Remove special-casing
of inner loop.
(vect_analyze_loop_1): Remove.
(vect_analyze_loop_form_1): Avoid building a loop_vec_info for
inner loop when vectorizing an outer loop by splitting out from ...
(vect_analyze_loop_form): ... here.
From-SVN: r228563
We have a global 1/2 and a cached 1/3, but recalculate 1/4, 1/6 and 1/9
each time we need them. That seems a bit arbitrary and makes the folding
code more noisy (especially once it's moved to match.pd).
This patch caches the other three constants too. Bootstrapped &
regression-tested on x86_64-linux-gnu.
gcc/
* real.h (dconst_quarter, dconst_sixth, dconst_ninth): New macros.
(dconst_quarter_ptr, dconst_sixth_ptr, dconst_ninth_ptr): Declare.
* real.c (CACHED_FRACTION): New helper macro.
(dconst_third_ptr): Use it.
(dconst_quarter_ptr, dconst_sixth_ptr, dconst_ninth_ptr): New.
* builtins.c (fold_builtin_sqrt): Use dconst_quarter and
dconst_sixth.
(fold_builtin_cbrt): Use dconst_sixth and dconst_ninth.
From-SVN: r228561
PR tree-optimization/67816
* tree-ssa-threadupdate.h (remove_jump_threads_including): Renamed
from remove_jump_threads_starting_at. Accept an edge rather than
a basic block.
* tree-ssa-threadupdate.c (removed_edges): New hash table.
(remove_jump_threads_including): Note edges that get removed from
the CFG for later pruning of jump threading paths including them.
(thread_through_all_blocks): Remove paths which include edges that
have been removed.
* tree-ssa-dom.c (optimize_stmt): Call remove_jump_threads_including
on each outgoing edges when optimizing away a control statement.
* gcc.c-torture/compile/pr67816.c: New test.
From-SVN: r228559
This patch introduces the Package_alias class which is a
finer representation of the different between a package and the
aliases it is imported under. Each alias keeps track of the location
of its import statement and how many times that alias has been used.
This allows the gofrontend to report when a specific import has not
been used even if a symbol from the package has been used by another
import.
Fixesgolang/go#12326.
Reviewed-on: https://go-review.googlesource.com/14259
From-SVN: r228550
2015-10-06 Sandra Loosemore <sandra@codesourcery.com>
gcc/
* config/nios2/nios2.c (nios2_symbol_ref_in_small_data_p):
For -mgpopt=local, also exclude unintialized common symbols.
* doc/invoke.texi (Nios II Options): Document the change.
From-SVN: r228549
PR c++/67863
* call.c (build_conditional_expr_1): Build the COND_EXPR with
a location.
* c-c++-common/Wtautological-compare-4.c: New test.
From-SVN: r228540
[gcc]
2015-10-05 Michael Meissner <meissner@linux.vnet.ibm.com>
Peter Bergner <bergner@vnet.ibm.com>
PR target/67808
* config/rs6000/rs6000.md (extenddftf2): In the expander, only
allow registers, but provide insns for the combiner to create for
loads from memory. Separate VSX code from non-VSX code. For
non-VSX code, combine extenddftf2_fprs into extenddftf2 and rename
externaldftf2_internal to externaldftf2_fprs. Reorder constraints
so that registers come before memory operations. Drop support from
converting DFmode to TFmode, if the DFmode value is in a GPR
register.
(extenddftf2_fprs): Likewise.
(extenddftf2_internal): Likewise.
(extenddftf2_vsx): Likewise.
(extendsftf2): In the expander, only allow registers, but provide
insns for the combiner to create for stores and loads.
[gcc/testsuite]
2015-10-05 Michael Meissner <meissner@linux.vnet.ibm.com>
Peter Bergner <bergner@vnet.ibm.com>
PR target/67808
* gcc.target/powerpc/pr67808.c: New test.
Co-Authored-By: Peter Bergner <bergner@vnet.ibm.com>
From-SVN: r228538
The decl parameter in default_elf_asm_named_section is actually used.
Applied as obvious after an arm-none-eabi build.
Ramana
2015-10-06 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
* varasm.c (default_elf_asm_named_section): Remove ATTRIBUTE_UNUSED
from the decl parameter.
From-SVN: r228537