Commit f5fe239e by Richard Biener Committed by Richard Biener

lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated comment.

2018-06-21  Richard Biener  <rguenther@suse.de>

	* lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
	comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
	* tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
	comment.
	* tree-streamer-out.c (write_ts_block_tree_pointers): Stream
	BLOCK_ABSTRACT_ORIGIN unconditionally.

From-SVN: r261847
parent e67343d7
2018-06-21 Richard Biener <rguenther@suse.de>
* lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
* tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
comment.
* tree-streamer-out.c (write_ts_block_tree_pointers): Stream
BLOCK_ABSTRACT_ORIGIN unconditionally.
2018-06-21 David Malcolm <dmalcolm@redhat.com> 2018-06-21 David Malcolm <dmalcolm@redhat.com>
* ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
......
...@@ -801,10 +801,7 @@ DFS::DFS_write_tree_body (struct output_block *ob, ...@@ -801,10 +801,7 @@ DFS::DFS_write_tree_body (struct output_block *ob,
DFS_follow_tree_edge (DECL_ATTRIBUTES (expr)); DFS_follow_tree_edge (DECL_ATTRIBUTES (expr));
/* Do not follow DECL_ABSTRACT_ORIGIN. We cannot handle debug information /* We use DECL_ABSTRACT_ORIGIN == error_mark_node to mark
for early inlining so drop it on the floor instead of ICEing in
dwarf2out.c.
We however use DECL_ABSTRACT_ORIGIN == error_mark_node to mark
declarations which should be eliminated by decl merging. Be sure none declarations which should be eliminated by decl merging. Be sure none
leaks to this point. */ leaks to this point. */
gcc_assert (DECL_ABSTRACT_ORIGIN (expr) != error_mark_node); gcc_assert (DECL_ABSTRACT_ORIGIN (expr) != error_mark_node);
...@@ -917,20 +914,8 @@ DFS::DFS_write_tree_body (struct output_block *ob, ...@@ -917,20 +914,8 @@ DFS::DFS_write_tree_body (struct output_block *ob,
DFS_follow_tree_edge (t); DFS_follow_tree_edge (t);
DFS_follow_tree_edge (BLOCK_SUPERCONTEXT (expr)); DFS_follow_tree_edge (BLOCK_SUPERCONTEXT (expr));
DFS_follow_tree_edge (BLOCK_ABSTRACT_ORIGIN (expr));
/* Follow BLOCK_ABSTRACT_ORIGIN for the limited cases we can
handle - those that represent inlined function scopes.
For the drop rest them on the floor instead of ICEing
in dwarf2out.c, but keep the notion of whether the block
is an inlined block by refering to itself for the sake of
tree_nonartificial_location. */
if (inlined_function_outer_scope_p (expr))
{
tree ultimate_origin = block_ultimate_origin (expr);
DFS_follow_tree_edge (ultimate_origin);
}
else if (BLOCK_ABSTRACT_ORIGIN (expr))
DFS_follow_tree_edge (expr);
/* Do not follow BLOCK_NONLOCALIZED_VARS. We cannot handle debug /* Do not follow BLOCK_NONLOCALIZED_VARS. We cannot handle debug
information for early inlined BLOCKs so drop it on the floor instead information for early inlined BLOCKs so drop it on the floor instead
of ICEing in dwarf2out.c. */ of ICEing in dwarf2out.c. */
......
...@@ -927,11 +927,6 @@ lto_input_ts_block_tree_pointers (struct lto_input_block *ib, ...@@ -927,11 +927,6 @@ lto_input_ts_block_tree_pointers (struct lto_input_block *ib,
BLOCK_VARS (expr) = streamer_read_chain (ib, data_in); BLOCK_VARS (expr) = streamer_read_chain (ib, data_in);
BLOCK_SUPERCONTEXT (expr) = stream_read_tree (ib, data_in); BLOCK_SUPERCONTEXT (expr) = stream_read_tree (ib, data_in);
/* Stream BLOCK_ABSTRACT_ORIGIN and BLOCK_SOURCE_LOCATION for
the limited cases we can handle - those that represent inlined
function scopes. For the rest them on the floor instead of ICEing in
dwarf2out.c. */
BLOCK_ABSTRACT_ORIGIN (expr) = stream_read_tree (ib, data_in); BLOCK_ABSTRACT_ORIGIN (expr) = stream_read_tree (ib, data_in);
/* Do not stream BLOCK_NONLOCALIZED_VARS. We cannot handle debug information /* Do not stream BLOCK_NONLOCALIZED_VARS. We cannot handle debug information
for early inlined BLOCKs so drop it on the floor instead of ICEing in for early inlined BLOCKs so drop it on the floor instead of ICEing in
......
...@@ -779,20 +779,8 @@ write_ts_block_tree_pointers (struct output_block *ob, tree expr, bool ref_p) ...@@ -779,20 +779,8 @@ write_ts_block_tree_pointers (struct output_block *ob, tree expr, bool ref_p)
streamer_write_chain (ob, BLOCK_VARS (expr), ref_p); streamer_write_chain (ob, BLOCK_VARS (expr), ref_p);
stream_write_tree (ob, BLOCK_SUPERCONTEXT (expr), ref_p); stream_write_tree (ob, BLOCK_SUPERCONTEXT (expr), ref_p);
stream_write_tree (ob, BLOCK_ABSTRACT_ORIGIN (expr), ref_p);
/* Stream BLOCK_ABSTRACT_ORIGIN for the limited cases we can handle - those
that represent inlined function scopes.
For the rest them on the floor instead of ICEing in dwarf2out.c, but
keep the notion of whether the block is an inlined block by refering
to itself for the sake of tree_nonartificial_location. */
if (inlined_function_outer_scope_p (expr))
{
tree ultimate_origin = block_ultimate_origin (expr);
stream_write_tree (ob, ultimate_origin, ref_p);
}
else
stream_write_tree (ob, (BLOCK_ABSTRACT_ORIGIN (expr)
? expr : NULL_TREE), ref_p);
/* Do not stream BLOCK_NONLOCALIZED_VARS. We cannot handle debug information /* Do not stream BLOCK_NONLOCALIZED_VARS. We cannot handle debug information
for early inlined BLOCKs so drop it on the floor instead of ICEing in for early inlined BLOCKs so drop it on the floor instead of ICEing in
dwarf2out.c. */ dwarf2out.c. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment