diff options
author | Richard Guenther <rguenther@suse.de> | 2011-02-21 13:38:48 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2011-02-21 13:38:48 +0000 |
commit | e292d00367ce0a736a7c1e1433e7920eeb0673cf (patch) | |
tree | 5486fd865bb1f6e0283517fb9cf12a043b6de87c | |
parent | c62f4cd9cf70644b7708f5f4eedbfff4c5aa48e2 (diff) | |
download | gcc-e292d00367ce0a736a7c1e1433e7920eeb0673cf.zip gcc-e292d00367ce0a736a7c1e1433e7920eeb0673cf.tar.gz gcc-e292d00367ce0a736a7c1e1433e7920eeb0673cf.tar.bz2 |
re PR bootstrap/47820 (LTO bootstrap failed with bootstrap-profiled)
2011-02-21 Richard Guenther <rguenther@suse.de>
PR lto/47820
* lto-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
Do not stream DECL_INITIAL for TRANSLATION_UNIT_DECLs.
(lto_input_ts_block_tree_pointers): Hook a BLOCK into the
TUs context.
* lto-streamer-out.c (lto_output_ts_decl_common_tree_pointers):
Do not stream DECL_INITIAL for TRANSLATION_UNIT_DECLs.
From-SVN: r170359
-rw-r--r-- | gcc/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/lto-streamer-in.c | 10 | ||||
-rw-r--r-- | gcc/lto-streamer-out.c | 3 |
3 files changed, 21 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cfed6bd..fbd8007 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2011-02-21 Richard Guenther <rguenther@suse.de> + + PR lto/47820 + * lto-streamer-in.c (lto_input_ts_decl_common_tree_pointers): + Do not stream DECL_INITIAL for TRANSLATION_UNIT_DECLs. + (lto_input_ts_block_tree_pointers): Hook a BLOCK into the + TUs context. + * lto-streamer-out.c (lto_output_ts_decl_common_tree_pointers): + Do not stream DECL_INITIAL for TRANSLATION_UNIT_DECLs. + 2011-02-20 Richard Guenther <rguenther@suse.de> PR lto/47822 diff --git a/gcc/lto-streamer-in.c b/gcc/lto-streamer-in.c index 5f5b263..7409c1a 100644 --- a/gcc/lto-streamer-in.c +++ b/gcc/lto-streamer-in.c @@ -1975,7 +1975,8 @@ lto_input_ts_decl_common_tree_pointers (struct lto_input_block *ib, DECL_SIZE (expr) = lto_input_tree (ib, data_in); DECL_SIZE_UNIT (expr) = lto_input_tree (ib, data_in); - if (TREE_CODE (expr) != FUNCTION_DECL) + if (TREE_CODE (expr) != FUNCTION_DECL + && TREE_CODE (expr) != TRANSLATION_UNIT_DECL) DECL_INITIAL (expr) = lto_input_tree (ib, data_in); DECL_ATTRIBUTES (expr) = lto_input_tree (ib, data_in); @@ -2207,6 +2208,13 @@ lto_input_ts_block_tree_pointers (struct lto_input_block *ib, BLOCK_CHAIN (expr) = BLOCK_SUBBLOCKS (BLOCK_SUPERCONTEXT (expr)); BLOCK_SUBBLOCKS (BLOCK_SUPERCONTEXT (expr)) = expr; } + /* The global block is rooted at the TU decl. Hook it here to + avoid the need to stream in this block during WPA time. */ + else if (BLOCK_SUPERCONTEXT (expr) + && TREE_CODE (BLOCK_SUPERCONTEXT (expr)) == TRANSLATION_UNIT_DECL) + DECL_INITIAL (BLOCK_SUPERCONTEXT (expr)) = expr; + /* The function-level block is connected at the time we read in + function bodies for the same reason. */ } diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c index bb2985a..29d171b 100644 --- a/gcc/lto-streamer-out.c +++ b/gcc/lto-streamer-out.c @@ -849,7 +849,8 @@ lto_output_ts_decl_common_tree_pointers (struct output_block *ob, tree expr, lto_output_tree_or_ref (ob, DECL_SIZE (expr), ref_p); lto_output_tree_or_ref (ob, DECL_SIZE_UNIT (expr), ref_p); - if (TREE_CODE (expr) != FUNCTION_DECL) + if (TREE_CODE (expr) != FUNCTION_DECL + && TREE_CODE (expr) != TRANSLATION_UNIT_DECL) { tree initial = DECL_INITIAL (expr); if (TREE_CODE (expr) == VAR_DECL |