On Mon, Dec 10, 2012 at 9:30 PM, Andrew Pinski <pins...@gmail.com> wrote: > > On Mon, Dec 10, 2012 at 9:23 PM, Dehao Chen <de...@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 <de...@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); > > }