diff mbox

[GOOGLE] disable streaming out TREE_BLOCK to cure lto-bootstrap

Message ID CAO2gOZXKdoS3VCT-3d5AfsU9iBoZKGZjyGD0_kUm2B=RpF+sVg@mail.gmail.com
State New
Headers show

Commit Message

Dehao Chen Dec. 11, 2012, 5:23 a.m. UTC
Hi,

The location_block patch has failed lto-bootstrap. This is fixed by a
bunch of fixes in trunk. But we would rather not spend too much effort
to back-port those fixes. So for now, we would disable streaming out
TREE_BLOCK as a workaround to solve to lto-bootstrap.

Bootstrapped and passed crosstool tests.

Okay for google-4_7?

Thanks,
Dehao

gcc/ChangeLog.google-4_7
2012-12-10  Dehao Chen  <dehao@google.com>

        * tree-streamer-out.c (write_ts_exp_tree_pointers): Disable
        streaming out TREE_BLOCK.

Comments

Xinliang David Li Dec. 11, 2012, 5:25 a.m. UTC | #1
ok.

David

On Mon, Dec 10, 2012 at 9:23 PM, Dehao Chen <dehao@google.com> wrote:
> Hi,
>
> The location_block patch has failed lto-bootstrap. This is fixed by a
> bunch of fixes in trunk. But we would rather not spend too much effort
> to back-port those fixes. So for now, we would disable streaming out
> TREE_BLOCK as a workaround to solve to lto-bootstrap.
>
> Bootstrapped and passed crosstool tests.
>
> Okay for google-4_7?
>
> Thanks,
> Dehao
>
> gcc/ChangeLog.google-4_7
> 2012-12-10  Dehao Chen  <dehao@google.com>
>
>         * tree-streamer-out.c (write_ts_exp_tree_pointers): Disable
>         streaming out TREE_BLOCK.
> Index: gcc/tree-streamer-out.c
> ===================================================================
> --- gcc/tree-streamer-out.c (revision 194378)
> +++ gcc/tree-streamer-out.c (working copy)
> @@ -667,7 +667,7 @@ write_ts_exp_tree_pointers (struct output_block *o
>    for (i = 0; i < TREE_OPERAND_LENGTH (expr); i++)
>      stream_write_tree (ob, TREE_OPERAND (expr, i), ref_p);
>    lto_output_location (ob, LOCATION_LOCUS (EXPR_LOCATION (expr)));
> -  stream_write_tree (ob, TREE_BLOCK (expr), ref_p);
> +  stream_write_tree (ob, NULL_TREE, ref_p);
>  }
Andrew Pinski Dec. 11, 2012, 5:30 a.m. UTC | #2
On Mon, Dec 10, 2012 at 9:23 PM, Dehao Chen <dehao@google.com> wrote:
> Hi,
>
> The location_block patch has failed lto-bootstrap. This is fixed by a
> bunch of fixes in trunk. But we would rather not spend too much effort
> to back-port those fixes. So for now, we would disable streaming out
> TREE_BLOCK as a workaround to solve to lto-bootstrap.
>
> Bootstrapped and passed crosstool tests.
>
> Okay for google-4_7?

Won't this break debugging information even more than it is already
broken with LTO?

Thanks,
Andrew Pinski


>
> Thanks,
> Dehao
>
> gcc/ChangeLog.google-4_7
> 2012-12-10  Dehao Chen  <dehao@google.com>
>
>         * tree-streamer-out.c (write_ts_exp_tree_pointers): Disable
>         streaming out TREE_BLOCK.
> Index: gcc/tree-streamer-out.c
> ===================================================================
> --- gcc/tree-streamer-out.c (revision 194378)
> +++ gcc/tree-streamer-out.c (working copy)
> @@ -667,7 +667,7 @@ write_ts_exp_tree_pointers (struct output_block *o
>    for (i = 0; i < TREE_OPERAND_LENGTH (expr); i++)
>      stream_write_tree (ob, TREE_OPERAND (expr, i), ref_p);
>    lto_output_location (ob, LOCATION_LOCUS (EXPR_LOCATION (expr)));
> -  stream_write_tree (ob, TREE_BLOCK (expr), ref_p);
> +  stream_write_tree (ob, NULL_TREE, ref_p);
>  }
Dehao Chen Dec. 11, 2012, 6:32 a.m. UTC | #3
On Mon, Dec 10, 2012 at 9:30 PM, Andrew Pinski <pinskia@gmail.com> wrote:
>
> On Mon, Dec 10, 2012 at 9:23 PM, Dehao Chen <dehao@google.com> wrote:
> > Hi,
> >
> > The location_block patch has failed lto-bootstrap. This is fixed by a
> > bunch of fixes in trunk. But we would rather not spend too much effort
> > to back-port those fixes. So for now, we would disable streaming out
> > TREE_BLOCK as a workaround to solve to lto-bootstrap.
> >
> > Bootstrapped and passed crosstool tests.
> >
> > Okay for google-4_7?
>
> Won't this break debugging information even more than it is already
> broken with LTO?

As you said, debug info in LTO is already broken (it can easily
overflow the 32bit integer space for location_t). And you are also
right that this patch will lose debug info (inline stack) for exprs in
google-4_7 branch. But as it just broke something that is already
broken, thus we think it is a reasonable workaround in order to make
lto actually work. When we upgrade to google-4_8, we will
automatically inherit from the trunk fixes.

Thanks,
Dehao

>
> Thanks,
> Andrew Pinski
>
>
> >
> > Thanks,
> > Dehao
> >
> > gcc/ChangeLog.google-4_7
> > 2012-12-10  Dehao Chen  <dehao@google.com>
> >
> >         * tree-streamer-out.c (write_ts_exp_tree_pointers): Disable
> >         streaming out TREE_BLOCK.
> > Index: gcc/tree-streamer-out.c
> > ===================================================================
> > --- gcc/tree-streamer-out.c (revision 194378)
> > +++ gcc/tree-streamer-out.c (working copy)
> > @@ -667,7 +667,7 @@ write_ts_exp_tree_pointers (struct output_block *o
> >    for (i = 0; i < TREE_OPERAND_LENGTH (expr); i++)
> >      stream_write_tree (ob, TREE_OPERAND (expr, i), ref_p);
> >    lto_output_location (ob, LOCATION_LOCUS (EXPR_LOCATION (expr)));
> > -  stream_write_tree (ob, TREE_BLOCK (expr), ref_p);
> > +  stream_write_tree (ob, NULL_TREE, ref_p);
> >  }
diff mbox

Patch

Index: gcc/tree-streamer-out.c
===================================================================
--- gcc/tree-streamer-out.c (revision 194378)
+++ gcc/tree-streamer-out.c (working copy)
@@ -667,7 +667,7 @@  write_ts_exp_tree_pointers (struct output_block *o
   for (i = 0; i < TREE_OPERAND_LENGTH (expr); i++)
     stream_write_tree (ob, TREE_OPERAND (expr, i), ref_p);
   lto_output_location (ob, LOCATION_LOCUS (EXPR_LOCATION (expr)));
-  stream_write_tree (ob, TREE_BLOCK (expr), ref_p);
+  stream_write_tree (ob, NULL_TREE, ref_p);
 }