Author: arekm Date: Thu Mar 15 18:24:34 2012 GMT Module: packages Tag: HEAD ---- Log message: - updated
---- Files affected: packages/gcc: gcc-branch.diff (1.59 -> 1.60) ---- Diffs: ================================================================ Index: packages/gcc/gcc-branch.diff diff -u packages/gcc/gcc-branch.diff:1.59 packages/gcc/gcc-branch.diff:1.60 --- packages/gcc/gcc-branch.diff:1.59 Thu Mar 1 19:23:52 2012 +++ packages/gcc/gcc-branch.diff Thu Mar 15 19:24:28 2012 @@ -1,14 +1,140 @@ +Index: gcc/targhooks.c +=================================================================== +--- gcc/targhooks.c (.../tags/gcc_4_6_3_release) (wersja 185440) ++++ gcc/targhooks.c (.../branches/gcc-4_6-branch) (wersja 185440) +@@ -529,6 +529,7 @@ + case scalar_to_vec: + case cond_branch_not_taken: + case vec_perm: ++ case vec_promote_demote: + return 1; + + case unaligned_load: +Index: gcc/DATESTAMP +=================================================================== +--- gcc/DATESTAMP (.../tags/gcc_4_6_3_release) (wersja 185440) ++++ gcc/DATESTAMP (.../branches/gcc-4_6-branch) (wersja 185440) +@@ -1 +1 @@ +-20120301 ++20120315 +Index: gcc/target.h +=================================================================== +--- gcc/target.h (.../tags/gcc_4_6_3_release) (wersja 185440) ++++ gcc/target.h (.../branches/gcc-4_6-branch) (wersja 185440) +@@ -128,7 +128,8 @@ + scalar_to_vec, + cond_branch_not_taken, + cond_branch_taken, +- vec_perm ++ vec_perm, ++ vec_promote_demote + }; + + /* Sets of optimization levels at which an option may be enabled by Index: gcc/DEV-PHASE =================================================================== ---- gcc/DEV-PHASE (.../tags/gcc_4_6_3_release) (wersja 184753) -+++ gcc/DEV-PHASE (.../branches/gcc-4_6-branch) (wersja 184753) +--- gcc/DEV-PHASE (.../tags/gcc_4_6_3_release) (wersja 185440) ++++ gcc/DEV-PHASE (.../branches/gcc-4_6-branch) (wersja 185440) @@ -0,0 +1 @@ +prerelease Index: gcc/ChangeLog =================================================================== ---- gcc/ChangeLog (.../tags/gcc_4_6_3_release) (wersja 184753) -+++ gcc/ChangeLog (.../branches/gcc-4_6-branch) (wersja 184753) -@@ -1,3 +1,8 @@ +--- gcc/ChangeLog (.../tags/gcc_4_6_3_release) (wersja 185440) ++++ gcc/ChangeLog (.../branches/gcc-4_6-branch) (wersja 185440) +@@ -1,3 +1,101 @@ ++2012-03-15 Chung-Lin Tang <[email protected]> ++ ++ Backport from mainline ++ 2012-03-10 Chung-Lin Tang <[email protected]> ++ ++ PR rtl-optimization/52528 ++ * combine.c (can_combine_p): Add setting of subst_low_luid ++ before call to expand_field_assignment(). ++ ++2012-03-12 John David Anglin <[email protected]> ++ ++ Backport from mainline ++ 2011-09-03 John David Anglin <[email protected]> ++ ++ PR Bug middle-end/50232 ++ * config/pa/pa.md (return): Define "return" insn pattern. ++ (epilogue): Use it when no epilogue is needed. ++ * config/pa/pa.c (pa_can_use_return_insn): New function. ++ * config/pa/pa-protos.h (pa_can_use_return_insn): Declare. ++ ++ Backport for mainline ++ 2012-01-28 John David Anglin <[email protected]> ++ ++ PR target/51871 ++ * config/pa/pa.c (pa_return_addr_rtx): Add support for PA2.0 export ++ stubs. ++ ++2012-03-06 Michael Meissner <[email protected]> ++ ++ Backport from mainline ++ PR target/50310 ++ * config/rs6000/vector.md (vector_uneq<mode>): Add support for ++ UNEQ, LTGT, ORDERED, and UNORDERED IEEE vector comparisons. ++ (vector_ltgt<mode>): Likewise. ++ (vector_ordered<mode>): Likewise. ++ (vector_unordered<mode>): Likewise. ++ * config/rs6000/rs6000.c (rs6000_emit_vector_compare_inner): ++ Likewise. ++ ++2012-03-04 John David Anglin <[email protected]> ++ ++ Backport from mainline ++ 2012-03-01 John David Anglin <[email protected]> ++ ++ PR target/52408 ++ * config/pa/pa.md (zvdep_imm32): Change type of variable x from int to ++ unsigned HOST_WIDE_INT. ++ (zvdep_imm64): Likewise. ++ (vdepi_ior): Change type of variable x from int to HOST_WIDE_INT. ++ (vdepi_and): Likewise. ++ Likewise for unamed 64-bit patterns. ++ * config/pa/predicates.md (lhs_lshift_cint_operand): Update comment. ++ ++2012-03-03 Eric Botcazou <[email protected]> ++ ++ PR target/52425 ++ Backport from mainline ++ 2011-05-22 Eric Botcazou <[email protected]> ++ ++ * config/sparc/sparc.c (sparc_delegitimize_address): Handle ++ UNSPEC_MOVE_PIC pattern. ++ ++2012-03-02 Peter Bergner <[email protected]> ++ ++ Backport from mainline ++ 2012-03-02 Peter Bergner <[email protected]> ++ ++ * config/rs6000/vsx.md (vsx_set_<mode>): Reorder operands. ++ ++2012-03-02 Bill Schmidt <[email protected]> ++ Ira Rosen <[email protected]> ++ ++ PR tree-optimization/50031 ++ PR tree-optimization/50969 ++ * targhooks.c (default_builtin_vectorization_cost): Handle ++ vec_promote_demote. ++ * target.h (enum vect_cost_for_stmt): Add vec_promote_demote. ++ * tree-vect-loop.c (vect_get_single_scalar_iteraion_cost): Handle ++ all types of reduction and pattern statements. ++ (vect_estimate_min_profitable_iters): Likewise. ++ * tree-vect-stmts.c (vect_model_promotion_demotion_cost): New function. ++ (vect_model_store_cost): Use vec_perm rather than vector_stmt for ++ statement cost. ++ (vect_model_load_cost): Likewise. ++ (vect_get_load_cost): Likewise; add dump logic for explicit realigns. ++ (vectorizable_type_demotion): Call vect_model_promotion_demotion_cost. ++ (vectorizable_type_promotion): Likewise. ++ * config/spu/spu.c (spu_builtin_vectorization_cost): Handle ++ vec_promote_demote. ++ * config/i386/i386.c (ix86_builtin_vectorization_cost): Likewise. ++ * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost): Update ++ vec_perm for VSX and handle vec_promote_demote. ++ +2012-03-01 Jakub Jelinek <[email protected]> + + * BASE-VER: Set to 4.6.4. @@ -17,10 +143,1130 @@ 2012-03-01 Release Manager * GCC 4.6.3 released. +Index: gcc/testsuite/gcc.target/powerpc/pr52457.c +=================================================================== +--- gcc/testsuite/gcc.target/powerpc/pr52457.c (.../tags/gcc_4_6_3_release) (wersja 0) ++++ gcc/testsuite/gcc.target/powerpc/pr52457.c (.../branches/gcc-4_6-branch) (wersja 185440) +@@ -0,0 +1,34 @@ ++/* { dg-do run { target { powerpc*-*-linux* } } } */ ++/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ ++/* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */ ++/* { dg-require-effective-target vsx_hw } */ ++/* { dg-options "-O1 -mcpu=power7" } */ ++ ++extern void abort (void); ++ ++typedef long long T; ++typedef T vl_t __attribute__((vector_size(2 * sizeof (T)))); ++ ++vl_t ++buggy_func (T x) ++{ ++ vl_t w; ++ T *p = (T *)&w; ++ p[0] = p[1] = x; ++ return w; ++} ++ ++int ++main(void) ++{ ++ vl_t rval; ++ T *pl; ++ ++ pl = (T *) &rval; ++ rval = buggy_func (2); ++ ++ if (pl[0] != 2 || pl[1] != 2) ++ abort (); ++ ++ return 0; ++} +Index: gcc/testsuite/gfortran.dg/intrinsic_8.f90 +=================================================================== +--- gcc/testsuite/gfortran.dg/intrinsic_8.f90 (.../tags/gcc_4_6_3_release) (wersja 0) ++++ gcc/testsuite/gfortran.dg/intrinsic_8.f90 (.../branches/gcc-4_6-branch) (wersja 185440) +@@ -0,0 +1,23 @@ ++! { dg-do compile } ++! ++! PR fortran/52452 ++! ++! Contributed by Roger Ferrer Ibanez ++! ++PROGRAM test_etime ++ IMPLICIT NONE ++ INTRINSIC :: etime ++ REAL(4) :: tarray(1:2) ++ REAL(4) :: result ++ ++ CALL etime(tarray, result) ++END PROGRAM test_etime ++ ++subroutine test_etime2 ++ IMPLICIT NONE ++ INTRINSIC :: etime ++ REAL(4) :: tarray(1:2) ++ REAL(4) :: result ++ ++ result = etime(tarray) ++END subroutine test_etime2 +Index: gcc/testsuite/gfortran.dg/proc_ptr_34.f90 +=================================================================== +--- gcc/testsuite/gfortran.dg/proc_ptr_34.f90 (.../tags/gcc_4_6_3_release) (wersja 0) ++++ gcc/testsuite/gfortran.dg/proc_ptr_34.f90 (.../branches/gcc-4_6-branch) (wersja 185440) +@@ -0,0 +1,79 @@ ++! { dg-do compile } ++! ++! PR fortran/52469 ++! ++! This was failing as the DECL of the proc pointer "func" ++! was used for the interface of the proc-pointer component "my_f_ptr" ++! rather than the decl of the proc-pointer target ++! ++! Contributed by [email protected] ++! ++ ++module ExampleFuncs ++ implicit none ++ ++ ! NOTE: "func" is a procedure pointer! ++ pointer :: func ++ interface ++ function func (z) ++ real :: func ++ real, intent (in) :: z ++ end function func ++ end interface ++ ++ type Contains_f_ptr ++ procedure (func), pointer, nopass :: my_f_ptr ++ end type Contains_f_ptr ++contains ++ ++function f1 (x) ++ real :: f1 ++ real, intent (in) :: x ++ ++ f1 = 2.0 * x ++ ++ return ++end function f1 ++ ++function f2 (x) ++ real :: f2 ++ real, intent (in) :: x ++ ++ f2 = 3.0 * x**2 ++ ++ return ++end function f2 ++ ++function fancy (func, x) ++ real :: fancy ++ real, intent (in) :: x ++ ++ interface AFunc ++ function func (y) ++ real :: func ++ real, intent (in) ::y ++ end function func ++ end interface AFunc ++ ++ fancy = func (x) + 3.3 * x ++end function fancy ++ ++end module ExampleFuncs ++ ++ ++program test_proc_ptr ++ use ExampleFuncs ++ implicit none ++ ++ type (Contains_f_ptr), dimension (2) :: NewType ++ ++ !NewType(1) % my_f_ptr => f1 ++ NewType(2) % my_f_ptr => f2 ++ ++ !write (*, *) NewType(1) % my_f_ptr (3.0), NewType(2) % my_f_ptr (3.0) ++ write (6, *) NewType(2) % my_f_ptr (3.0) ! < Shall print '27.0' ++ ++ stop ++end program test_proc_ptr ++ ++! { dg-final { cleanup-modules "examplefuncs" } } +Index: gcc/testsuite/ChangeLog +=================================================================== +--- gcc/testsuite/ChangeLog (.../tags/gcc_4_6_3_release) (wersja 185440) ++++ gcc/testsuite/ChangeLog (.../branches/gcc-4_6-branch) (wersja 185440) +@@ -1,3 +1,23 @@ ++2012-03-10 Tobias Burnus <[email protected]> ++ ++ PR fortran/52469 ++ * gfortran.dg/proc_ptr_34.f90: New. ++ ++2012-03-06 Tobias Burnus <[email protected]> ++ ++ Backport from mainline ++ 2012-03-02 Tobias Burnus <[email protected]> ++ ++ PR fortran/52452 ++ * gfortran.dg/intrinsic_8.f90: New. ++ ++2012-03-02 Peter Bergner <[email protected]> ++ ++ Backport from mainline ++ 2012-03-02 Peter Bergner <[email protected]> ++ ++ * gcc.target/powerpc/pr52457.c: New test. ++ + 2012-03-01 Release Manager + + * GCC 4.6.3 released. +Index: gcc/fortran/ChangeLog +=================================================================== +--- gcc/fortran/ChangeLog (.../tags/gcc_4_6_3_release) (wersja 185440) ++++ gcc/fortran/ChangeLog (.../branches/gcc-4_6-branch) (wersja 185440) +@@ -1,3 +1,18 @@ ++2012-03-10 Tobias Burnus <[email protected]> ++ ++ PR fortran/52469 ++ * trans-types.c (gfc_get_function_type): Handle backend_decl ++ of a procedure pointer. ++ ++2012-03-06 Tobias Burnus <[email protected]> ++ ++ Backport from mainline ++ 2012-03-02 Tobias Burnus <[email protected]> ++ ++ PR fortran/52452 ++ * resolve.c (resolve_intrinsic): Don't search for a ++ function if we know that it is a subroutine. ++ + 2012-03-01 Release Manager + + * GCC 4.6.3 released. +Index: gcc/fortran/trans-types.c +=================================================================== +--- gcc/fortran/trans-types.c (.../tags/gcc_4_6_3_release) (wersja 185440) ++++ gcc/fortran/trans-types.c (.../branches/gcc-4_6-branch) (wersja 185440) +@@ -2519,7 +2519,11 @@ + || sym->attr.flavor == FL_PROGRAM); + + if (sym->backend_decl) +- return TREE_TYPE (sym->backend_decl); ++ { ++ if (sym->attr.proc_pointer) ++ return TREE_TYPE (TREE_TYPE (sym->backend_decl)); ++ return TREE_TYPE (sym->backend_decl); ++ } + + alternate_return = 0; + typelist = NULL_TREE; +Index: gcc/fortran/resolve.c +=================================================================== +--- gcc/fortran/resolve.c (.../tags/gcc_4_6_3_release) (wersja 185440) ++++ gcc/fortran/resolve.c (.../branches/gcc-4_6-branch) (wersja 185440) +@@ -1452,7 +1452,7 @@ + + if (sym->intmod_sym_id) + isym = gfc_intrinsic_function_by_id ((gfc_isym_id) sym->intmod_sym_id); +- else ++ else if (!sym->attr.subroutine) + isym = gfc_find_function (sym->name); + + if (isym) Index: gcc/BASE-VER =================================================================== ---- gcc/BASE-VER (.../tags/gcc_4_6_3_release) (wersja 184753) -+++ gcc/BASE-VER (.../branches/gcc-4_6-branch) (wersja 184753) +--- gcc/BASE-VER (.../tags/gcc_4_6_3_release) (wersja 185440) ++++ gcc/BASE-VER (.../branches/gcc-4_6-branch) (wersja 185440) @@ -1 +1 @@ -4.6.3 +4.6.4 +Index: gcc/tree-vect-loop.c +=================================================================== +--- gcc/tree-vect-loop.c (.../tags/gcc_4_6_3_release) (wersja 185440) ++++ gcc/tree-vect-loop.c (.../branches/gcc-4_6-branch) (wersja 185440) +@@ -2104,7 +2104,8 @@ + if (stmt_info + && !STMT_VINFO_RELEVANT_P (stmt_info) + && (!STMT_VINFO_LIVE_P (stmt_info) +- || STMT_VINFO_DEF_TYPE (stmt_info) != vect_reduction_def)) ++ || !VECTORIZABLE_CYCLE_DEF (STMT_VINFO_DEF_TYPE (stmt_info))) ++ && !STMT_VINFO_IN_PATTERN_P (stmt_info)) + continue; + + if (STMT_VINFO_DATA_REF (vinfo_for_stmt (stmt))) +@@ -2251,11 +2252,19 @@ + { + gimple stmt = gsi_stmt (si); + stmt_vec_info stmt_info = vinfo_for_stmt (stmt); ++ ++ if (STMT_VINFO_IN_PATTERN_P (stmt_info)) ++ { ++ stmt = STMT_VINFO_RELATED_STMT (stmt_info); ++ stmt_info = vinfo_for_stmt (stmt); ++ } ++ + /* Skip stmts that are not vectorized inside the loop. */ + if (!STMT_VINFO_RELEVANT_P (stmt_info) + && (!STMT_VINFO_LIVE_P (stmt_info) +- || STMT_VINFO_DEF_TYPE (stmt_info) != vect_reduction_def)) ++ || !VECTORIZABLE_CYCLE_DEF (STMT_VINFO_DEF_TYPE (stmt_info)))) + continue; ++ + vec_inside_cost += STMT_VINFO_INSIDE_OF_LOOP_COST (stmt_info) * factor; + /* FIXME: for stmts in the inner-loop in outer-loop vectorization, + some of the "outside" costs are generated inside the outer-loop. */ +Index: gcc/tree-vect-stmts.c +=================================================================== +--- gcc/tree-vect-stmts.c (.../tags/gcc_4_6_3_release) (wersja 185440) ++++ gcc/tree-vect-stmts.c (.../branches/gcc-4_6-branch) (wersja 185440) +@@ -623,6 +623,46 @@ + } + + ++/* Model cost for type demotion and promotion operations. PWR is normally ++ zero for single-step promotions and demotions. It will be one if ++ two-step promotion/demotion is required, and so on. Each additional ++ step doubles the number of instructions required. */ ++ ++static void ++vect_model_promotion_demotion_cost (stmt_vec_info stmt_info, ++ enum vect_def_type *dt, int pwr) ++{ ++ int i, tmp; ++ int inside_cost = 0, outside_cost = 0, single_stmt_cost; ++ ++ /* The SLP costs were already calculated during SLP tree build. */ ++ if (PURE_SLP_STMT (stmt_info)) ++ return; ++ ++ single_stmt_cost = vect_get_stmt_cost (vec_promote_demote); ++ for (i = 0; i < pwr + 1; i++) ++ { ++ tmp = (STMT_VINFO_TYPE (stmt_info) == type_promotion_vec_info_type) ? ++ (i + 1) : i; ++ inside_cost += vect_pow2 (tmp) * single_stmt_cost; ++ } ++ ++ /* FORNOW: Assuming maximum 2 args per stmts. */ ++ for (i = 0; i < 2; i++) ++ { ++ if (dt[i] == vect_constant_def || dt[i] == vect_external_def) ++ outside_cost += vect_get_stmt_cost (vector_stmt); ++ } ++ ++ if (vect_print_dump_info (REPORT_COST)) ++ fprintf (vect_dump, "vect_model_promotion_demotion_cost: inside_cost = %d, " ++ "outside_cost = %d .", inside_cost, outside_cost); ++ ++ /* Set the costs in STMT_INFO. */ ++ stmt_vinfo_set_inside_of_loop_cost (stmt_info, NULL, inside_cost); ++ stmt_vinfo_set_outside_of_loop_cost (stmt_info, NULL, outside_cost); ++} ++ + /* Function vect_cost_strided_group_size + + For strided load or store, return the group_size only if it is the first +@@ -691,7 +731,7 @@ + { + /* Uses a high and low interleave operation for each needed permute. */ + inside_cost = ncopies * exact_log2(group_size) * group_size +- * vect_get_stmt_cost (vector_stmt); ++ * vect_get_stmt_cost (vec_perm); + + if (vect_print_dump_info (REPORT_COST)) + fprintf (vect_dump, "vect_model_store_cost: strided group_size = %d .", +@@ -795,7 +835,7 @@ + { + /* Uses an even and odd extract operations for each needed permute. */ + inside_cost = ncopies * exact_log2(group_size) * group_size +- * vect_get_stmt_cost (vector_stmt); ++ * vect_get_stmt_cost (vec_perm); + + if (vect_print_dump_info (REPORT_COST)) + fprintf (vect_dump, "vect_model_load_cost: strided group_size = %d .", +@@ -855,7 +895,7 @@ + case dr_explicit_realign: + { + *inside_cost += ncopies * (2 * vect_get_stmt_cost (vector_load) +- + vect_get_stmt_cost (vector_stmt)); ++ + vect_get_stmt_cost (vec_perm)); + + /* FIXME: If the misalignment remains fixed across the iterations of + the containing loop, the following cost should be added to the +@@ -863,6 +903,9 @@ + if (targetm.vectorize.builtin_mask_for_load) + *inside_cost += vect_get_stmt_cost (vector_stmt); + ++ if (vect_print_dump_info (REPORT_COST)) ++ fprintf (vect_dump, "vect_model_load_cost: explicit realign"); ++ + break; + } + case dr_explicit_realign_optimized: +@@ -886,7 +929,12 @@ + } + + *inside_cost += ncopies * (vect_get_stmt_cost (vector_load) +- + vect_get_stmt_cost (vector_stmt)); ++ + vect_get_stmt_cost (vec_perm)); ++ ++ if (vect_print_dump_info (REPORT_COST)) ++ fprintf (vect_dump, ++ "vect_model_load_cost: explicit realign optimized"); ++ + break; + } + +@@ -2919,7 +2967,7 @@ + STMT_VINFO_TYPE (stmt_info) = type_demotion_vec_info_type; + if (vect_print_dump_info (REPORT_DETAILS)) + fprintf (vect_dump, "=== vectorizable_demotion ==="); +- vect_model_simple_cost (stmt_info, ncopies, dt, NULL); ++ vect_model_promotion_demotion_cost (stmt_info, dt, multi_step_cvt); + return true; + } + +@@ -3217,7 +3265,7 @@ + STMT_VINFO_TYPE (stmt_info) = type_promotion_vec_info_type; + if (vect_print_dump_info (REPORT_DETAILS)) + fprintf (vect_dump, "=== vectorizable_promotion ==="); +- vect_model_simple_cost (stmt_info, 2*ncopies, dt, NULL); ++ vect_model_promotion_demotion_cost (stmt_info, dt, multi_step_cvt); + return true; + } + +Index: gcc/combine.c +=================================================================== +--- gcc/combine.c (.../tags/gcc_4_6_3_release) (wersja 185440) ++++ gcc/combine.c (.../branches/gcc-4_6-branch) (wersja 185440) +@@ -1788,6 +1788,10 @@ + if (set == 0) + return 0; + ++ /* The simplification in expand_field_assignment may call back to ++ get_last_value, so set safe guard here. */ ++ subst_low_luid = DF_INSN_LUID (insn); ++ + set = expand_field_assignment (set); + src = SET_SRC (set), dest = SET_DEST (set); + +Index: gcc/config/spu/spu.c +=================================================================== +--- gcc/config/spu/spu.c (.../tags/gcc_4_6_3_release) (wersja 185440) ++++ gcc/config/spu/spu.c (.../branches/gcc-4_6-branch) (wersja 185440) +@@ -6794,6 +6794,7 @@ + case scalar_to_vec: + case cond_branch_not_taken: + case vec_perm: ++ case vec_promote_demote: + return 1; + + case scalar_store: +Index: gcc/config/sparc/sparc.c +=================================================================== +--- gcc/config/sparc/sparc.c (.../tags/gcc_4_6_3_release) (wersja 185440) ++++ gcc/config/sparc/sparc.c (.../branches/gcc-4_6-branch) (wersja 185440) +@@ -3658,13 +3658,17 @@ + { + x = delegitimize_mem_from_attrs (x); + +- if (GET_CODE (x) == LO_SUM +- && GET_CODE (XEXP (x, 1)) == UNSPEC +- && XINT (XEXP (x, 1), 1) == UNSPEC_TLSLE) +- { +- x = XVECEXP (XEXP (x, 1), 0, 0); +- gcc_assert (GET_CODE (x) == SYMBOL_REF); +- } ++ if (GET_CODE (x) == LO_SUM && GET_CODE (XEXP (x, 1)) == UNSPEC) ++ switch (XINT (XEXP (x, 1), 1)) ++ { ++ case UNSPEC_MOVE_PIC: <<Diff was trimmed, longer than 597 lines>> ---- CVS-web: http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/gcc/gcc-branch.diff?r1=1.59&r2=1.60&f=u _______________________________________________ pld-cvs-commit mailing list [email protected] http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
