Commit 014b59e6 by Richard Biener Committed by Richard Biener

gimple-low.c (lower_gimple_bind): Clear DECL_CHAIN of vars in gimple_bind_vars…

gimple-low.c (lower_gimple_bind): Clear DECL_CHAIN of vars in gimple_bind_vars but not in BLOCK_VARS.

2016-10-07  Richard Biener  <rguenther@suse.de>

	* gimple-low.c (lower_gimple_bind): Clear DECL_CHAIN of
	vars in gimple_bind_vars but not in BLOCK_VARS.

From-SVN: r240855
parent 4023bc56
2016-10-07 Richard Biener <rguenther@suse.de>
* gimple-low.c (lower_gimple_bind): Clear DECL_CHAIN of
vars in gimple_bind_vars but not in BLOCK_VARS.
2016-10-07 Richard Biener <rguenther@suse.de>
PR tree-optimization/77879
* tree-ssa-structalias.c (handle_const_call): Properly handle
NRV return slots.
......
......@@ -416,6 +416,23 @@ lower_gimple_bind (gimple_stmt_iterator *gsi, struct lower_data *data)
}
record_vars (gimple_bind_vars (stmt));
/* Scrap DECL_CHAIN up to BLOCK_VARS to ease GC after we no longer
need gimple_bind_vars. */
tree next;
tree end = NULL_TREE;
if (gimple_bind_block (stmt))
end = BLOCK_VARS (gimple_bind_block (stmt));
for (tree var = gimple_bind_vars (stmt); var != end; var = next)
{
/* Ugh, something is violating the constraint that BLOCK_VARS
is a sub-chain of gimple_bind_vars. */
if (! var)
break;
next = DECL_CHAIN (var);
DECL_CHAIN (var) = NULL_TREE;
}
lower_sequence (gimple_bind_body_ptr (stmt), data);
if (new_block)
......
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