- 09 Oct, 2015 3 commits
-
-
2015-10-09 Richard Biener <rguenther@suse.de> PR tree-optimization/67891 * gimple-match.h (gimple_simplified_result_is_gimple_val): New helper. (gimple_resimplify1): Declare. (gimple_resimplify2): Likewise. (gimple_resimplify3): Likewise. * gimple-match-head.c (gimple_resimplify1): Export. (gimple_resimplify2): Likewise. (gimple_resimplify3): Likewise. (maybe_push_res_to_seq): Use gimple_simplified_result_is_gimple_val. * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise. * tree-ssa-sccvn.c (visit_reference_op_load): Use gimple_resimplify1 to avoid creating stmts without VN info. * gcc.dg/tree-ssa/pr67891.c: New testcase. From-SVN: r228635
Richard Biener committed -
* value-prof.c (gimple_ic): Add missing calls to unlink_stmt_vdef and release_ssa_name in two places. (gimple_stringop_fixed_value): Similarly. From-SVN: r228632
Jeff Law committed -
From-SVN: r228631
GCC Administrator committed
-
- 08 Oct, 2015 23 commits
-
-
* ipa-icf.c (sem_item::compare_symbol_references): Fix use of availability. From-SVN: r228628
Jan Hubicka committed -
* tree-ssa-loop-im.c (rewrite_bittest): Add missing call to release_defs. From-SVN: r228627
Jeff Law committed -
* tree-ssa-loop-im.c (rewrite_bittest): Add missing call to release_defs. From-SVN: r228626
Jeff Law committed -
* tree-stdarg.c (expand_ifn_va_arg_1): Add missing call to unlink_stmt_vdef and release_ssa_name_fn. From-SVN: r228625
Jeff Law committed -
* tree-ssa-dse.c (dse_optimize_stmt): Add missing call to release_defs. From-SVN: r228624
Jeff Law committed -
liboffloadmic/ * runtime/offload_engine.cpp (Engine::init_process): Use strdup instead of sizeof+malloc+sprintf, check for return value. * runtime/offload_env.cpp (MicEnvVar::get_env_var_kind): Check for strdup return value. * runtime/offload_host.cpp (__offload_init_library_once): Check for strdup return value. Fix size calculation of COI_HOST_THREAD_AFFINITY. * runtime/emulator/coi_device.cpp (COIProcessWaitForShutdown): Check for malloc return value. From-SVN: r228622
Ilya Verbin committed -
There is is no point to round up the SSE register save area to 16 bytes if the incoming stack boundary is less than 16 bytes. * config/i386/i386.c (ix86_compute_frame_layout): Round up the SSE register save area to 16 bytes only if the incoming stack boundary is no less than 16 bytes. From-SVN: r228621
H.J. Lu committed -
* tree-ssa-phiopt.c (factor_out_conversion): Add missing calls to release_ssa_name. Fix typo in comment. From-SVN: r228619
Jeff Law committed -
* config/nvptx/nvptx.h (struct machine_function): Add comment. * config/nvptx/nvptx.c (nvptx_declare_function_name): Functions may return pointer as well as in memory. (nvptx_output_return): Likewise. From-SVN: r228618
Nathan Sidwell committed -
This patch moves the sqrt and cbrt simplification rules to match.pd. builtins.c now only does the constant folding. Bootstrapped & regression-tested on x86_64-linux-gnu. gcc/ * builtins.c (fold_builtin_sqrt, fold_builtin_cbrt): Delete. (fold_builtin_1): Update accordingly. Handle constant arguments here. * match.pd: Add rules previously handled by fold_builtin_sqrt and fold_builtin_cbrt. gcc/testsuite/ * gcc.dg/builtins-47.c: Test the optimized dump instead. From-SVN: r228616
Richard Sandiford committed -
The upcoming patch to move sqrt and cbrt simplifications to match.pd caused a regression because the (abs @0)->@0 simplification didn't trigger for: (abs (convert (abs X))) The simplification is based on tree_expr_nonnegative_p, which at the moment just gives up if it sees an SSA_NAME. This patch makes tree_expr_nonnegative_p recurse into SSA name definitions, but limits the depth of recursion to a small number for the reason mentioned in the comment (adapted from an existing comment in gimple_val_nonnegative_real_p). The patch reuses code in tree-vrp.c, moving it to gimple-fold.c. It also replaces calls to gimple_val_nonnegative_real_p with calls to tree_expr_nonnegative_p. A knock-on effect is that we can now prove _i_589 < 0 is false in sequences like: i_1917 = ASSERT_EXPR <i_1075, i_1075 == 0>; _i_589 = (const int) i_1917; _i_1507 = ASSERT_EXPR <_i_589, _i_589 < 0>; This defeats an assert in tree-vrp.c that ASSERT_EXPR conditions are never known to be false. Previously the assert only ever used local knowledge and so would be limited to cases like x != x for integer x. Now that we use global knowledge it's possible to prove the assertion condition is false in blocks that are in practice unreachable. The patch therefore removes the assert. Bootstrapped & regression-tested on x86_64-linux-gnu. I didn't write a specific test because this is already covered by the testsuite if the follow-on patch is also applied. gcc/ * params.def (PARAM_MAX_SSA_NAME_QUERY_DEPTH): New param. * doc/invoke.texi (--param max-ssa-name-query-depth): Document. * fold-const.h (tree_unary_nonnegative_warnv_p) (tree_single_nonnegative_warnv_p, tree_call_nonnegative_warnv_p) (tree_expr_nonnegative_warnv_p): Add depth parameters. * fold-const.c: Include gimple-fold.h and params.h. (tree_ssa_name_nonnegative_warnv_p): New function. (tree_unary_nonnegative_warnv_p, tree_binary_nonnegative_warnv_p) (tree_single_nonnegative_warnv_p, tree_call_nonnegative_warnv_p) (tree_invalid_nonnegative_warnv_p, tree_expr_nonnegative_warnv_p): Add a depth parameter and increment it for recursive calls to tree_expr_nonnegative_warnv_p. Use tree_ssa_name_nonnegative_warnv_p to handle SSA names. * gimple-fold.h (gimple_val_nonnegative_real_p): Delete. (gimple_stmt_nonnegative_warnv_p): Declare. * tree-vrp.c (remove_range_assertions): Remove assert that condition cannot be proven false. (gimple_assign_nonnegative_warnv_p, gimple_call_nonnegative_warnv_p) (gimple_stmt_nonnegative_warnv_p): Move to... * gimple-fold.c: ...here. Add depth parameters and pass them down to the tree routines. Accept statements that aren't assignments or calls but just return false for them. (gimple_val_nonnegative_real_p): Delete. * tree-ssa-math-opts.c (gimple_expand_builtin_pow): Use tree_expr_nonnegative_p instead of gimple_val_nonnegative_real_p. Check HONOR_NANs first. From-SVN: r228614
Richard Sandiford committed -
2015-10-08 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (meet_with_1): Make the argument of abs signed. Remove unnecessary MIN. From-SVN: r228607
Martin Jambor committed -
* cp-tree.h (SIMPLE_TARGET_EXPR_P): New. * init.c (get_nsdmi): Use it. * typeck2.c (massage_init_elt): Use it. From-SVN: r228606
Jason Merrill committed -
From-SVN: r228605
Jason Merrill committed -
From-SVN: r228603
Joseph Myers committed -
re PR c++/67557 (Calling copy constructor of base class in constructor of derived class produces crashing code) PR c++/67557 * call.c (is_base_field_ref): New. (unsafe_copy_elision_p): New. (build_over_call): Use it. From-SVN: r228602
Jason Merrill committed -
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
Yuri Rumyantsev committed -
* config/rs6000/rs6000.c (rs6000_xcoff_debug_unwind_info): Always return UI_NONE. From-SVN: r228600
David Edelsohn committed -
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
Yuri Rumyantsev committed -
* tree-ssa-reassoc.c (dump_ops_vector): Print newline after each ops element. From-SVN: r228598
Marek Polacek committed -
2015-10-08 Tom de Vries <tom@codesourcery.com> * gcc.dg/dse.c: Only dump in dse1 pass. * gcc.dg/tree-ssa/pr30375.c: Same. From-SVN: r228597
Tom de Vries committed -
gcc/ChangeLog: 2015-10-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com> PR c/65345 * config/s390/s390.c (s390_atomic_assign_expand_fenv): Use create_tmp_var_raw instead of create_tmp_var. From-SVN: r228594
Andreas Krebbel committed -
From-SVN: r228590
GCC Administrator committed
-
- 07 Oct, 2015 14 commits
-
-
* 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
Jan Hubicka committed -
* tree-ssa-dom.c (optimize_stmt): Don't set LOOPS_NEED_FIXUP here. * tree-ssa-threadupdate.c (remove_ctrl_stmt_and_useless_edges): Do it here instead. Tighten test to avoid setting LOOPS_NEED_FIXUP unnecessarily. @@ -1848,12 +1848,6 @@ optimize_stmt (basic_block bb, gimple_stmt_iterator si, From-SVN: r228585
Jeff Law committed -
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
Aditya Kumar committed -
* config/rs6000/xcoff.h (ASM_PREFERRED_EH_DATA_FORMAT): Use 64-bit encoding in 64-bit mode. From-SVN: r228579
David Edelsohn committed -
Fixes golang/go#12616. Reviewed-on: https://go-review.googlesource.com/14645 From-SVN: r228578
Ian Lance Taylor committed -
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
Uros Bizjak committed -
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
Ian Lance Taylor committed -
* testsuite/lib/atomic-dg.exp (atomic_link_flags): Move flag setting to atomic_init. (atomic_init): Restrict flags usage. From-SVN: r228575
James Norris committed -
2015-10-07 Aditya Kumar <aditya.k7@samsung.com> Sebastian Pop <s.pop@samsung.com> * graphite-scop-detection.c (parameter_index_in_region): Remove use of SESE_ADD_PARAMS. (find_scop_parameters): Same. * sese.c (new_sese_info): Same. * sese.h (struct sese_info_t): Remove add_params. (SESE_ADD_PARAMS): Remove. Co-Authored-By: Sebastian Pop <s.pop@samsung.com> From-SVN: r228574
Aditya Kumar committed -
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
Aditya Kumar committed -
re PR sanitizer/67867 (UBSan bootstrap fails with error: ‘otype’ may be used uninitialized in this function [-Werror=maybe-uninitialized]) PR sanitizer/67867 * search.c (accessible_p): Initialize OTYPE to NULL_TREE. From-SVN: r228569
Marek Polacek committed -
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
H.J. Lu committed -
Similar to as, ld, nm and objdump, gcc configure should check $READELF_FOR_TARGET for readelf. PR bootstrap/67385 * configure.ac (gcc_cv_readelf): Check $READELF_FOR_TARGET. * configure: Regenerated. From-SVN: r228567
H.J. Lu committed -
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
Andre Vehreschild committed
-