This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See crosstool-NG for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] cc/gcc: Update gcc to 4.7.1


On Mon, Jul 2, 2012 at 8:24 PM, Bryan Hundven <bryanhundven@gmail.com> wrote:
> # HG changeset patch
> # User Bryan Hundven <bryanhundven@gmail.com>
> # Date 1341285804 25200
> # Node ID 37ff10f5a6c8c6700e2b840dda771e1434adc85f
> # Parent  e489fc02a7ab0a7e04b922728bf898dee80d0ee4
> cc/gcc: Update gcc to 4.7.1
>
> Also copy 4.7.0 patches to 4.7.1.
>
> Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
>
> diff -r e489fc02a7ab -r 37ff10f5a6c8 config/cc/gcc.in
> --- a/config/cc/gcc.in  Mon Jul 02 20:07:58 2012 -0700
> +++ b/config/cc/gcc.in  Mon Jul 02 20:23:24 2012 -0700
> @@ -42,6 +42,12 @@
>      depends on CC_GCC_SHOW_LINARO
>      select CC_GCC_4_7
>
> +config CC_V_4_7_1
> +    bool
> +    prompt "4.7.1 (EXPERIMENTAL)"
> +    depends on EXPERIMENTAL
> +    select CC_GCC_4_7
> +
>  config CC_V_4_7_0
>      bool
>      prompt "4.7.0 (EXPERIMENTAL)"
> @@ -359,6 +365,7 @@
>  # Don't remove next line
>  # CT_INSERT_VERSION_STRING_BELOW
>      default "linaro-4.7-2012.06" if CC_V_linaro_4_7_2012_06
> +    default "4.7.1" if CC_V_4_7_1
>      default "4.7.0" if CC_V_4_7_0
>      default "linaro-4.6-2012.06" if CC_V_linaro_4_6_2012_06
>      default "4.6.3" if CC_V_4_6_3
> diff -r e489fc02a7ab -r 37ff10f5a6c8 patches/gcc/4.7.1/100-PR52734-tree-ssa-tail-merge.patch
> --- /dev/null   Thu Jan 01 00:00:00 1970 +0000
> +++ b/patches/gcc/4.7.1/100-PR52734-tree-ssa-tail-merge.patch   Mon Jul 02 20:23:24 2012 -0700
> @@ -0,0 +1,91 @@
> +------------------------------------------------------------------------
> +r186424 | vries | 2012-04-13 18:44:18 +0200 (Fri, 13 Apr 2012) | 12 lines
> +
> +2012-04-13  Tom de Vries  <tom@codesourcery.com>
> +
> +       Backport from mainline r186418.
> +
> +       2012-04-13  Tom de Vries  <tom@codesourcery.com>
> +
> +       * tree-ssa-tail-merge.c (gsi_advance_bw_nondebug_nonlocal): Add
> +       parameters vuse and vuse_escaped.
> +       (find_duplicate): Init vuse1, vuse2 and vuse_escaped.  Pass to
> +       gsi_advance_bw_nondebug_nonlocal.  Return if vuse_escaped and
> +       vuse1 != vuse2.
> +
> +------------------------------------------------------------------------
> +Index: gcc/tree-ssa-tail-merge.c
> +===================================================================
> +--- gcc-4.7.0/gcc/tree-ssa-tail-merge.c        (revision 186423)
> ++++ gcc-4.7.0/gcc/tree-ssa-tail-merge.c        (revision 186424)
> +@@ -1123,18 +1123,31 @@
> +     }
> + }
> +
> +-/* Let GSI skip backwards over local defs.  */
> ++/* Let GSI skip backwards over local defs.  Return the earliest vuse in VUSE.
> ++   Return true in VUSE_ESCAPED if the vuse influenced a SSA_OP_DEF of one of the
> ++   processed statements.  */
> +
> + static void
> +-gsi_advance_bw_nondebug_nonlocal (gimple_stmt_iterator *gsi)
> ++gsi_advance_bw_nondebug_nonlocal (gimple_stmt_iterator *gsi, tree *vuse,
> ++                                bool *vuse_escaped)
> + {
> +   gimple stmt;
> ++  tree lvuse;
> +
> +   while (true)
> +     {
> +       if (gsi_end_p (*gsi))
> +       return;
> +       stmt = gsi_stmt (*gsi);
> ++
> ++      lvuse = gimple_vuse (stmt);
> ++      if (lvuse != NULL_TREE)
> ++      {
> ++        *vuse = lvuse;
> ++        if (!ZERO_SSA_OPERANDS (stmt, SSA_OP_DEF))
> ++          *vuse_escaped = true;
> ++      }
> ++
> +       if (!(is_gimple_assign (stmt) && local_def (gimple_get_lhs (stmt))
> +           && !gimple_has_side_effects (stmt)))
> +       return;
> +@@ -1150,9 +1163,11 @@
> + {
> +   gimple_stmt_iterator gsi1 = gsi_last_nondebug_bb (bb1);
> +   gimple_stmt_iterator gsi2 = gsi_last_nondebug_bb (bb2);
> ++  tree vuse1 = NULL_TREE, vuse2 = NULL_TREE;
> ++  bool vuse_escaped = false;
> +
> +-  gsi_advance_bw_nondebug_nonlocal (&gsi1);
> +-  gsi_advance_bw_nondebug_nonlocal (&gsi2);
> ++  gsi_advance_bw_nondebug_nonlocal (&gsi1, &vuse1, &vuse_escaped);
> ++  gsi_advance_bw_nondebug_nonlocal (&gsi2, &vuse2, &vuse_escaped);
> +
> +   while (!gsi_end_p (gsi1) && !gsi_end_p (gsi2))
> +     {
> +@@ -1161,13 +1176,20 @@
> +
> +       gsi_prev_nondebug (&gsi1);
> +       gsi_prev_nondebug (&gsi2);
> +-      gsi_advance_bw_nondebug_nonlocal (&gsi1);
> +-      gsi_advance_bw_nondebug_nonlocal (&gsi2);
> ++      gsi_advance_bw_nondebug_nonlocal (&gsi1, &vuse1, &vuse_escaped);
> ++      gsi_advance_bw_nondebug_nonlocal (&gsi2, &vuse2, &vuse_escaped);
> +     }
> +
> +   if (!(gsi_end_p (gsi1) && gsi_end_p (gsi2)))
> +     return;
> +
> ++  /* If the incoming vuses are not the same, and the vuse escaped into an
> ++     SSA_OP_DEF, then merging the 2 blocks will change the value of the def,
> ++     which potentially means the semantics of one of the blocks will be changed.
> ++     TODO: make this check more precise.  */
> ++  if (vuse_escaped && vuse1 != vuse2)
> ++    return;
> ++
> +   if (dump_file)
> +     fprintf (dump_file, "find_duplicates: <bb %d> duplicate of <bb %d>\n",
> +            bb1->index, bb2->index);

I will commit this change again without the patch. It isn't needed in
4.7.1, as it is already upstream in 4.7.1.

-Bryan

--
For unsubscribe information see http://sourceware.org/lists.html#faq


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]