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
(ATTR_PERSIST): New constant.
(msp430_data_attr): New function - verifies an attribute that only
applies to variables.
(msp430_attributes): Add noinit and persistent attributes.
(noinit_section): New variable.
(presis_section): New variable.
(TARGET_ASM_INIT_SECTIONS): Define.
(msp430_init_sections): New function - initialises the noinit and
persist section variables.
(msp430_select_section): Add support for noinit and persist
attributes.
(msp430_section_type_flags): Likewise.
* doc/extend.texi: Document the reent, critical, wakeup, noinit
and persistent attributes.
tests * gcc.target/msp430: New directory.
* gcc.target/msp430/msp430.exp: New file. Runs MSP430 specific
tests.
* gcc.target/msp430/data-attributes.c: New file. Checks the
noinit and persistent data attributes.
From-SVN: r228531
Analyze only those bbs which are outside the region for uses which might be
defined inside the region. This is intended to improve the compile time. This
algorithm may be further improved by only looking at the successors of region as
these regions are sese. Added FIXMEs to make this improvement in future.
Passes regtest and bootstrap on x86_64.
gcc/ChangeLog:
2015-10-05 Aditya Kumar <hiraditya@msn.com>
* graphite-sese-to-poly.c (build_loop_iteration_domains): Only loops
which are in this region are passed so gcc_assert and remove redundant
computation.
* sese.c (sese_build_liveouts): Pass only those bbs which are not in region.
(sese_bad_liveouts_use): Only BBs which are not in region are passed so
gcc_assert on that and remove unnecessary computation.
(sese_build_liveouts_use): Same.
From-SVN: r228529
1. Move declarations near the assignment/usage.
2. Assign type to members which were void*.
3. Rename scop->context to scop::param_context, and scop::ctx to
scop::isl_context
No functional changes intended. Passes regtest and bootstrap.
gcc/ChangeLog:
2015-10-05 Aditya Kumar <aditya.k7@samsung.com>
* graphite-dependences.c (scop_get_reads): Renamed scop->context to scop->param_context.
(scop_get_must_writes): Same.
(scop_get_may_writes): Same.
(scop_get_original_schedule): Same.
(scop_get_transformed_schedule): Same.
(subtract_commutative_associative_deps): Same.
* graphite-isl-ast-to-gimple.c (add_parameters_to_ivs_params): Same.
(generate_isl_context): Same.
(generate_isl_schedule): Same.
(scop_to_isl_ast): Same.
(graphite_regenerate_ast_isl): Same.
* graphite-optimize-isl.c (scop_get_domains): Same.
(optimize_isl): Renamed scop->context to scop->param_context.
* graphite-poly.c (new_poly_bb): Change the type of argument to gimple_poly_bb_p.
(new_scop): Renamed scop->context to scop->param_context.
(free_scop): Same.
(print_scop_context): Same.
* graphite-poly.h (new_poly_dr): Change the type of argument from void* to data_reference_p.
(struct poly_bb): Change the type of black_box to gimple_poly_bb_p.
(new_poly_bb): Change the type of argument from void* to gimple_poly_bb_p.
(pbb_set_black_box): Same.
(struct scop): Rename context to param_context, ctx to isl_context.
* graphite-scop-detection.c (scop_detection::build_scop_bbs_1): Move declarations closer to assignment.
(find_params_in_bb): Same.
(find_scop_parameters): Same.
* graphite-sese-to-poly.c (unsigned ssa_name_version_typesize): Global to be used for statement IDs.
(isl_id_for_pbb): Use ssa_name_version_typesize.
(simple_copy_phi_p): Move declarations closer to assignment.
(build_pbb_scattering_polyhedrons): Same.
(build_scop_scattering): Same.
(isl_id_for_ssa_name): Same.
(extract_affine_name): Same.
(extract_affine_int): Same.
(extract_affine): Same.
(set_scop_parameter_dim): Use renamed member.
(build_loop_iteration_domains): Same.
(add_param_constraints): Same.
(build_scop_iteration_domain): Same.
(pdr_add_data_dimensions): Same.
(build_poly_dr): Same.
(build_scop_drs): Move declarations closer to assignment.
(analyze_drs_in_stmts): Same.
(insert_out_of_ssa_copy): Same.
(insert_out_of_ssa_copy_on_edge): Same.
(propagate_expr_outside_region): Same.
(rewrite_phi_out_of_ssa): Same.
(rewrite_degenerate_phi): Same.
(rewrite_reductions_out_of_ssa): Same.
(rewrite_cross_bb_scalar_dependence): Same.
(handle_scalar_deps_crossing_scop_limits): Same.
(rewrite_cross_bb_scalar_deps): Same.
* graphite.c (graphite_transform_loops): Use renamed member.
From-SVN: r228528
gcc/
PR target/67849
* config/i386/sse.md (define_split vec_select/V8FI): Restrict
split for upper-bank registers when target does not support
AVX512VL.
(define_insn "vec_extract_lo_<mode><mask_name>"): Restrict
split when target does not support AVX512VL.
From-SVN: r228525
* doc/extend.texi (Template Instantiation): Reorder options and
de-emphasize -frepo.
* doc/invoke.texi (C++ Dialect Options): Use -fstrict-enums in
example instead of -frepo.
From-SVN: r228518